Reputation: 2410
Mostly, I'm very happy the way Vim autocompletes words for me. Currently, I'm working in a HTML/CML/Javascript/CSS framework, that uses a defined set of CSS class names to style an application. Class names like eg
Framework_Table
FrameWork_NumberInput
Framework_TextOutput
which one would use like
.Framework_Table {}
.FrameWork_NumberInput {}
.Framework_TextOutput {}
Question is, how/where do I list these class names to Vim's autocomplete can pick them up?
Upvotes: 1
Views: 261
Reputation: 196576
You can use dictionary-based completion.
Put all your identifiers in a file, say /path/to/project/cssdict.txt
.
Framework_Table
FrameWork_NumberInput
Framework_TextOutput
In Vim, do :setlocal dictionary=/path/to/project/cssdict.txt
.
Hit <C-x><C-k>
to complete using that dictionary.
Read :help 'dictionary'
and :help compl-dictionary
.
Upvotes: 2