I use snake_case a lot and right now Vim consider snake_case
as one word. Is it possible to make it consider underscore as a word so snake_case
is 3 words ?
You must log in or register to comment.
Take a look at ‘iskeyword’ (:h iskeyword). I’m not able to test right now but I think it should work.
edit: after some digging, people are pointing out this breaks syntax highlighting and are recommending solving this with plugins like https://github.com/chaoren/vim-wordmotion
So, I’ve checked both options and the first one suits better my needs and does not break syntax highlighting for me so for now I’ve just set in my .vimrc :
set iskeyword-=_
and it does the job! Thanks!(Well, it breaks syntax highlighting lol)