Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
TheBB opened this issue Oct 23, 2011 · 2 comments
Closed

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

TheBB opened this issue Oct 23, 2011 · 2 comments

Comments

@TheBB
Copy link
Member

TheBB commented Oct 23, 2011

Originally reported by: tass (Bitbucket: tass, GitHub: tass)


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


@TheBB
Copy link
Member Author

TheBB commented Oct 27, 2011

Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro):


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.

@TheBB
Copy link
Member Author

TheBB commented Oct 28, 2011

Original comment by Vegard Øye (Bitbucket: epsil, GitHub: epsil):


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.)

@TheBB TheBB closed this as completed Jan 19, 2017
shadowrylander pushed a commit to syvlorg/aiern that referenced this issue Jun 28, 2021
Use this new functionality for emacs buffer-local keybindings. Also add
the previously uncommitted general--evil-p helper function.
Addresses emacs-evil#24.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant