Change forward-word / backward-word / kill-word to CamelCase words in Emacs

I need the ability to navigate and edit parts of the camel word in Emacs. The functionality is similar to the camel humps in Intellij IDEA. For example, I need Blah, Foo, and Bar in the BlahFooBar line to be identified as 3 separate words so that I can move around and edit them as they are separate words.

I tried playing with the syntax table

(modify-syntax-entry ?A ".") (modify-syntax-entry ?F ".") 

This leads to the creation of lah, oo and ar words and the characters B and F of word separators. So navigating backward (and backward-kill-word) is not working properly.

I need word boundaries based on a regular expression, not a delimiter.

+6
source share
3 answers

Mx subword-mode should do just that.

+16
source

Get py-forward-, resp. py-backward-to-nomenclature from python-mode.el

It works with any mode.

https://launchpad.net/python-mode/+download

+1
source
0
source

Source: https://habr.com/ru/post/927785/


All Articles