3

I installed Vim 8.1 with all the default options on Windows 10. I didn't modify vimrc. It takes more than 5 seconds to launch Vim (or gvim) each time I edit a file, and has just as long of a delay when I quit the application also.

If I launch it using the --clean option, then it takes less than a second to launch.

How can I make Vim always behave like it was launched with --clean?

--startuptime log:

000.000  000.000: --- VIM STARTING ---
000.000  000.000: Allocated generic buffers
004.000  004.000: locale set
004.000  000.000: clipboard setup
004.000  000.000: window checked
005.000  001.000: inits 1
069.000  064.000: parsing arguments
069.000  000.000: expanding arguments
583.000  514.000: shell init
584.000  001.000: Termcap init
585.000  001.000: inits 2
585.000  000.000: init highlight
1311.000  010.000  010.000: sourcing c:\Program Files (x86)\Vim\vim81\syntax\syncolor.vim
1694.000  676.000  666.000: sourcing c:\Program Files (x86)\Vim\vim81\syntax\synload.vim
2281.000  377.000  377.000: sourcing c:\Program Files (x86)\Vim\vim81\filetype.vim
2514.000  1675.000  622.000: sourcing c:\Program Files (x86)\Vim\vim81\syntax\syntax.vim
2521.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\filetype.vim
2699.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\ftplugin.vim
3133.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\indent.vim
3341.000  2504.000  826.000: sourcing c:\Program Files (x86)\Vim\vim81/defaults.vim
3750.000  2915.000  411.000: sourcing c:\Program Files (x86)\Vim\vim81/vimrc_example.vim
3750.000  2916.000  001.000: sourcing $VIM\_vimrc
3750.000  249.000: sourcing vimrc file(s)
3987.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\getscriptPlugin.vim
3992.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\gzip.vim
3999.000  002.000  002.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\logiPat.vim
4003.000  000.000  000.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\manpager.vim
4010.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\matchparen.vim
4019.000  002.000  002.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\netrwPlugin.vim
4024.000  000.000  000.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\rrhelper.vim
4029.000  000.000  000.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\spellfile.vim
4035.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\tarPlugin.vim
4039.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\tohtml.vim
4042.000  000.000  000.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\vimballPlugin.vim
4046.000  001.000  001.000: sourcing c:\Program Files (x86)\Vim\vim81\plugin\zipPlugin.vim
4052.000  002.000  002.000: sourcing c:\Program Files (x86)\Vim\vim81\pack\dist\opt\matchit\plugin\matchit.vim
4052.000  290.000: loading plugins
4053.000  001.000: loading packages
4253.000  200.000: loading after plugins
4253.000  000.000: inits 3
5080.000  827.000: reading viminfo
5081.000  001.000: setting raw mode
5398.000  317.000: start termcap
5398.000  000.000: clearing screen
5399.000  001.000: opening buffers
5399.000  000.000: BufEnter autocommands
5399.000  000.000: editing files in windows
5400.000  001.000: VimEnter autocommands
5400.000  000.000: before starting main loop
5446.000  046.000: first screen update
5446.000  000.000: --- VIM STARTED ---
  • Does it make a difference, if you disable the virus scanner? – Ralf Mar 31 at 9:40
  • Hmmm. Sorry, I can't test that. Corporate-controlled Windows instance. – Jeremy Stein Mar 31 at 15:58
  • Well, among other things, --clean prevents loading of any plugins. That suggests that you might get relief by checking whether there are specific plugins causing the problem and if so, disable them. If there is no one or two culprits and plugin loading is just collectively slow then you're probably looking at system upgrade as your only solution. – B Layer May 13 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.