How can vim solve the problem of slow startup after installing plug-ins?

  question, vim

Some plug-ins were installed, and then vim startup speed was significantly slower. Test it with the following command

vim --startuptime timefile  test.php

clipboard.png

See that the plug-in shown in the above figure takes the longest time to load. What is the solution to this problem?

There are more plug-ins loaded at startup, and it is certain that the speed will slow down. I don’t know what plug-in manager you are using. Vim-plug like mine can delay loading, for example, javascript-related plug-ins can only be loaded when the js file is opened. A plug-in is loaded only when a command is triggered. You can look at this method and try to optimize it.

Also (if you use syntastic), because I write more js and eslint is slower, so I use ithttps://github.com/ruanyl/vim-eslint, this plug-in can improve the speed of eslint to a certain extent.