In vim, string seperated by "-" would be treated as multiple words, so if I name a variable like 'this-is-a-very-long-variable-name', then vim treat that variable name as two words, so I can easily locate to the start or ending of "variable" and "name".
However, in most programming languages, I am not allowed to name a variable like that, the only programming language that support and prefer that name style is Lisp. in most other programming language, I have to use "_" instead.
So, if I have a variable named "this_is_a_very_long_variable_name", is there any way that I could move on that variable name by pressing "w/b/e" to move by word instead of pressing "h/l" to move by characters?
You can change how words behave with iskeyword
:set iskeyword-=_
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With