The one IDE feature that I always missed and invariably plug into vim is tab completion.
I’m a big fan of SuperTab, but one thing I can’t stand is the fact that it treats the parts of CSS class names and IDs with dashes as individual words.
I’ve found a couple of possible solutions for camelCase and underscore_completion but I can’t seem to find anything that supports plain-old-dashes.
This is not a CSS-specific problem: Vim uses the value of
iskeywordto perform completion.Type
:set iskeyword?to see what characters are considered to be part of keywords. The default on a Mac is supposed to be@,48-57,_,192-255.You can add the dash to the list with this command:
Add this line to your
~/.vimrcto make this setting stick: