1. Frank Fischer
  2. evil
Issue #24 resolved

indent by ">" doesn't follow customize-group

tass
created an issue

In customize-group, ruby indent level is set to 2. But if I indent by typing ">", 4 spaces are inserted.

Comments (3)

  1. Frank Fischer repo owner

    The shift-width of evil is defined by the (customizable) variable evil-shift-width. The reason is that each major mode has its own variable determining the indentation level and I have no idea how to find out the correct value for the currently active major mode in a buffer.

  2. Vegard Øye
    • assigned issue to epsilon47

    As of commit e845d49, the variable evil-shift-width is buffer-local. You can adapt it to ruby-mode's indent level with the following:

    (add-hook 'ruby-mode-hook
              (lambda ()
                (setq evil-shift-width ruby-indent-level)))
    

    This sets the shift width to 2 in Ruby buffers, while other buffers use the default value of 4. (To change the default value, use setq-default.)

  3. Log in to comment