My boot time for vim is about a half second (tested with "--startuptime"), but after I reload vimrc a couple times via source
, it gets slower subsequently. I have not debugged .vimrc in a systematic way, so I am not sure how to proceed. Setting verbose
helps to kind of see what is going on and I am almost certain that the .vimrc is being loaded more than once. (especially filetype.vim
and ftplugin.vim
) Whenever I press Ctrl-C to stop the hang, I get an error in filetype.vim
, which I think is because vim spends most time trying to load filetype.vim
. The most probable culprit I see is the auto reload of .vimrc:
if has("autocmd")
autocmd bufwritepost .vimrc source $MYVIMRC "auto source vimrc
endif
How could I stop this from happening?