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?

4
  • 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. Sep 20, 2015 at 3:42
  • One solution is to go forward two words then back a word!
    – Czipperz
    Sep 20, 2015 at 8:00
  • One of the other answers I gave the link to has the explanation for vim-like behavior: stackoverflow.com/questions/3931837/…
    – osolmaz
    Sep 20, 2015 at 11:59
  • The syntax-subword package (also available on Melpa) might be close to what you want. I haven't use the package myself. Sep 21, 2015 at 3:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.