evil
evil copied to clipboard
evil-forward-word-begin doesn't work with superword-mode
Originally reported by: arianaut (Bitbucket: arianaut, GitHub: Unknown)
superword-mode, which ships with Emacs, changes symbol characters like underscore into word characters (so forward-word, backward-word skip over them).
However, evil-forward-word-begin behaves erratically on words containing underscores when superword-mode is enabled.
- Bitbucket: https://bitbucket.org/lyro/evil/issue/721
I am experiencing this issue as well.
If it helps, I found that disabling superword-mode and using this workaround helps: https://emacs.stackexchange.com/a/27350/2676
;; For python
(add-hook 'python-mode-hook #'(lambda () (modify-syntax-entry ?_ "w")))
;; For ruby
(add-hook 'ruby-mode-hook #'(lambda () (modify-syntax-entry ?_ "w")))
;; For Javascript
(add-hook 'js2-mode-hook #'(lambda () (modify-syntax-entry ?_ "w")))
which allows evil-mode to consider _ as part of the word. It's not a great solution, but it somewhat mimics superword-mode
That workaround actually does not work. If a line contains "_" near its end (in combination with a handful of other symbols or by itself), the cursor will still get stuck there.
Hi, has there been any progress on this issue? It is also affecting me.