0

When I press o in evil mode (which moves the cursor to the line under, and goes into insert mode), the cursor is indented by two spaces.

When I press o, the cursor goes
  here

This happens in text mode and elisp buffers.

I tried to shut it off with this:

(defun remove-autoindent ()
  (electric-indent-mode nil))
 
(add-hook 'emacs-lisp-mode-hook 'remove-autoindent)
(add-hook 'text-mode-hook 'remove-autoindent)

But it didn't work. Which setting is causing this behavior?

I do not have any indent instructions outside of web-mode :config within use-package.

2

1 Answer 1

0

Coincidentally I just figured out a fix before finding this issue:

(setq evil-auto-indent nil)

Note however that if evil-auto-indent is set, pressing o just calls indent-according-to-mode behind the scenes, so however you have that set up is likely the root cause.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.