Without further information, I believe the problem is that for evil-shift-width it is necessary to set the value of evil-shift-width to 4 in python-mode and 2 to ruby-mode (for two examples), but always set to 2 .
The problem in this case is that indent not defined globally in Emacs and, of course, not in python-mode . In python-mode there is a python-indent variable that is set to 4, and this is a variable that should be used.
While annoying is the need to use custom variables for each of the main modes, what each of the modes uses, and probably this is a solution that will really work:
(add-hook 'python-mode-hook (function (lambda () (setq evil-shift-width python-indent)))) (add-hook 'ruby-mode-hook (function (lambda () (setq evil-shift-width ruby-indent-level))))
Adding a new one for each major mode that you want to support.
Trey jackson
source share