I am running OS X Lion 10.7.3
and Macvim
runs significantly slower than vim
on the terminal for me. All movement commands in Macvim
are much slower. Moving up and down in visual
mode is equally as laggy. I see none of this lag when using vim
from the terminal.
Does anyone know what the reasons may be?
I am running NERDtree
on every open tab, and I know this contributes some memory overhead and potentially some slow down; but even when I don't run NERDtree
Macvim
runs much slower than vim
from the terminal.
Any help in solving this would be greatly appreciated.
4 Answers
The first thing to do is to start MacVim with mvim -u NONE -U NONE --noplugin
, which will prevent any startup files from running. If it is no longer slow to respond, you have a configuration problem somewhere.
-
-
1@SaamJB, MacVim is distributed with a CLI script called
mvim
. In the terminal, type/path/to/where/you/have/put/mvim -u NONE -U NONE --noplugin
.– romainlMay 30, 2012 at 6:10 -
I am experiencing the same issues myself and launching without plugins causes a huge speedup. Are there any good ways to narrow done which plugin is causing this bar placing them back in one by one? Jun 20, 2012 at 21:06
The Vim you are running in Terminal.app is probably the default Vim provided by Apple. It is built with much less features than MacVim so it's starting and working much faster.
Is MacVim slow in every occasion? When editing any filetype? Only for some filetypes?
Vim is notoriously prone to slowdown when syntax-highlighting very long lines, would that be the case here? Is vim still slow after :syntax off
?
Some other things known for slowing down Vim are :set cursorline
and :set cursorcolumn
.
-
I tried this before reinstalling and it didn't solve the issue. Thanks for the help though.– SaamJBMay 30, 2012 at 22:17
-
I have no diagnosis for the problem, but reinstalling (potentially updating to a newer version, I don't remember which version I was previously running) MacVim solved almost all of the lag. It isn't quite as fast as Vim on the terminal, but this is to be expected. It is no longer unbearably slow.
My problem was mainly that MacVim opened, read, and wrote especially slowly (sometimes upward of 15 seconds). mvim --startuptime
revealed that sourcing files from .vimrc and the runtime/ directory was taking most of the time, and the problem was solved by adding the line:
set rtp+=/usr/local/Cellar/macvim/7.4-73/MacVim.app/Contents/Resources/vim
As you can see, I am using a Homebrew install of MacVim, and accordingly you should make sure you enter the correct path and version number.
~/.vim/
folder.