1

I frequently type camelCase variable names, and enjoy the features subword-mode offers.

This, this and this reiterate the fact that the community desires vim-like functionality where they can choose whether to go to the end of the current word, or beginning of the next word. One can use

  • forward-to-word from the misc package,
  • viper-forward-word from viper or
  • evil-forward-word-begin from evil to achieve the same thing.

However using these mean that subword-mode will be overridden. I am guessing that the only way to have both would be to implement a function like subword-forward-to-word which combines the two functionalities. I lack the knowledge in elisp to do so, so I am asking for your help. How can this be done?

osolmaz
  • 435
  • 3
  • 13
  • 2
    The question is not clear to me as I am not familiar with vim navigation. It would help of you add examples to the question demonstrating how you like the navigation to be. – Kaushal Modi Sep 20 '15 at 03:42
  • One solution is to go forward two words then back a word! – Czipperz Sep 20 '15 at 08:00
  • One of the other answers I gave the link to has the explanation for vim-like behavior: http://stackoverflow.com/questions/3931837/modifying-emacs-forward-word-backward-ward-behavior-to-be-like-in-vi-vim – osolmaz Sep 20 '15 at 11:59
  • The [`syntax-subword`](https://bitbucket.org/jpkotta/syntax-subword/src/a1e0accb754d81e25b866b5ecfca5e1659e83580/syntax-subword.el) package (also available on Melpa) might be close to what you want. I haven't use the package myself. – Kaushal Modi Sep 21 '15 at 03:14

0 Answers0