I am currently cleaning up my .vimrc
. I learned that I can spread out filetype specific commands into separate files in the .vim
/vimfiles
directory by putting them into ftplugin
and after/ftplugin
directory, respectively.
So, I put all the filetype specific options (e.g. expandtab
, spell
...) there that I previously set with autocommand
s.
But I also have variables in my .vimrc
that are specific to filetype. E.g. for C I set (or let) the following:
let g:load_doxygen_syntax=1
let c_space_errors=1
unlet c_comment_strings
let c_curly_error=1
let c_syntax_for_h=1
let g:doxygen_javadoc_autobrief=0
let g:doxygen_enhanced_color=1
I now put this into the after/ftplugin/c.vim
file and it seems to work like before.
Are there any consequences of this that I did not foresee? Now those variables are set every time I open a C file instead of once after startup. May there be any negative affect due to that?