:
is set as keyword (set iskeyword
) for C++ source file by default, is there a way to just disable that in my .vimrc file instead of doing set iskeyword-=:
every time? It seems the plug-in set the keyword is loaded after loading .vimrc file.
1 Answer
You could put
setlocal iskeyword-=:
inside ~/.vim/after/ftplugin/cpp.vim
Loads automatically when you open files where the filetype
is cpp
. If it doesn't work, try setting filetype plugin on
.
Update:
Or you could do
autocmd FileType cpp :setlocal iskeyword-=:
In your .vimrc
, but I recommend you put it in a ftplugin - it keeps your .vimrc
clutter-free.