Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
Please add a list of the plugins in your ~/.vim/ folder. – romainl May 30 '12 at 5:56

The first thing to do is to start MacVim with -u NONE -U NONE --noplogin, which will prevent any startup files from running. If it is no longer slow to respond, you have a configuration problem somewhere.

share|improve this answer
How do I launch macvim this way? – SaamJB May 30 '12 at 5:00
@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. – romainl May 30 '12 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? – Patrick O'Doherty Jun 20 '12 at 21:06

The Vim you are running in 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.

share|improve this answer
I tried this before reinstalling and it didn't solve the issue. Thanks for the help though. – SaamJB May 30 '12 at 22:17
up vote 1 down vote accepted

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.

share|improve this answer

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/

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .