Last Updated: February 25, 2016
·
1.592K
· jandudulski

VimTip#5: treat dashes as part of word

If you prefer dashes over underscores to separate words in classes or ids, you can consider to add in your .vimrc:

set iskeyword+=-

After this you can use word text object to select/change/delete whole id or class name, jump around with w, e or b, etc., etc.

Still, if you need to jump to next/previous real word in dashed one, remember about f- or F- combination.