Wednesday, April 30, 2008

vim word movement with underscore delimiter

see VIM FAQ, 12.35.
:set iskeyword-=_

Also see the camelcasemotion plug-in, described in one of the comments below by leoc.me.

4 comments:

Anonymous said...

Thanks for the post. No more dt_ for me!

phleet said...

Awesomely simple. Thanks

Anonymous said...

Hiya, I realise this is an old thread, but I found it when trying to add this functionality to vim, and I think there is a better way now:

CamelCase motion plugin (also works with underscores)

http://www.vim.org/scripts/script.php?script_id=1905

As described on StackOverflow, the plugin does not break autocompletion, which the previous method would do.

http://stackoverflow.com/questions/1279462/how-can-i-configure-vim-so-that-movement-commands-will-include-underscores-and-ca

leo said...

Thanks a lot, leoc.me, that looks extremely useful! I'll add it to the original post.