I'm having the following CSS class structure
.mAIcon
.mAIcon-reject
.mAIcon-edit
.mAIcon-accept
.event
and so on.
Inside my HTML files I want to autocomplete these class names.
But when I type
<span class="mAIcon mA|">
and I want to autocomplete the rest the only thing I get is
<span class="mAIcon mAIcon|">
To get what I really want I have to type an extra -
and for example e
and use the autocompletion again.
But then I get everything that starts with an e
, even the class event
.
This is really annoying and makes the autocompletion rather useless in this case.
I use Vim's generic keyword completion with the i_CTRL-N
command and I don't have any additional completion plugins installed.
Is it possible to include the -
to the detection of CSS class names for the autocompletion?
<c-x><c-n>
, which should also be specified in your question.'iskeyword'
, and even though keywords are used also for other commands (side effects), this is still the correct way to achieve what you want without using other kinds of (auto)completion.ctags
should be able to generate tags for your project. Then you can do tag completion withi_CTRL-X_CTRL-]
. However, I see in the docs that tag completion also uses theiskeyword
option, so I might be wrong. In any case, you probably want to read:h ins-completion
.