The files in the syntax directory should be named after the filetype detected by Vim. In the case of your C++ code, I'd expect it would detect it as cpp. You can check that with the following command: :set filetype? cpp Or you can use :set ft? for short. Once you confirm that the filetype is indeed cpp, you can create file ~/.vim/after/syntax/cpp.vim (for ...


Most probably you have set spell enabled which usually checks spelling in comments. If you don't need it turn it off with :set nospell. Activate when you need it with :set spell. To toggle use :set spell!. Map it if you do it often, for example: nnoremap yos :set spell!<CR> Then yos will toggle spelling.


You can use :execute {expr1} to execute the string that results from the evaluation of {expr1} as an Ex command. execute "syn sync ...".s:funcrgx."..." in place of syn sync ...

Only top voted, non community-wiki answers of a minimum length are eligible