I have been using MacVim in graphical mode for several weeks now but I am quite disappointed with its start time.
When I run MacVim as an OSx App bundle then it starts for several seconds. The same goes for opening a new window. I read somewhere that it's because of Vim starts new process for every window and it might be caused by plugins, which are being loaded during every startup, slowing it down.
I don't think that's the case because when I execute MacVim via terminal command then it starts almost instantly.
Does anybody know how to speed the app-start process or where the problem might be?
Thanks.
Update
MacVim was installed through Homebrew, mvim leads to /usr/local/bin/mvim -> ../Cellar/macvim/7.4-94/bin/mvim, which is a bash script, thar runs ..Cellar/macvim/7.4-94/MacVim.app/Contents/MacOS/Vim binary with -g switch. Next to it is MacVim binary, which is somehow needed by Vim binary, because when I tried to move it, it stopped working properly. It seems that when 'Vim -g' is started then it's loaded instantly, but MacVim starts slowly and also any new window opened from already running 'Vim' app starts slowly.
I had the same problem with MacVim taking 5-10 seconds to open a new window. I do have a couple of plugins, but nothing crazy. The same vimrc/plugins I have used on both Windows and Linux versions of Vim and works fine there with no slowness.
There is an option called "Quickstart" in MacVim's preferences dialog, which tells MacVim NOT to reprocess the vimrc/startup scripts for each new window. The only consequence is that if you make changes to your .vim/ stuff, it won't take effect in new windows until you restart the whole MacVim app. That's fine with me.
Go to the "MacVim" menu, then choose "Preferences...", and select the checkbox next to "Enable Quickstart":
After this, new windows open immediately.
If your version of vim has been compiled with the +startuptime
flag, you can record the startup time for plugins and your vimrc with:
vim file.txt --startuptime startup.log
If you configure based on FileType, try opening those files to see if it's a type-specific issue that you're running into.
Source: https://vimhelp.org/starting.txt.html#--startuptime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With