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'm using Arch Linux and I installed vim from the official repos.

It runs OK, but when I have syntax and cursor highlight turned on, it is extremely slow.

I already trying running only the 'core' of vim, disabling my ~/.vim, ~/.vimrc and also the plugin and autoload folder on the vim runtime directory.

I have a decent machine, Intel i5, 4GB ram and a decent video card that runs Gnome-Shell, Unity and 3D games just fine. It happens on other distros and even with small files.

Any clues?

share|improve this question
Vim's responsiveness when syntax highlighting is enabled depends on the file type, the file size, and on line lengths. It has a known performance issue highlighting extremely long lines. Execute ":help syntax.txt" and search for "slow". You'll find comments on file types and conditions that can cause Vim to be slow, as well as tips for improving performance. – garyjohn May 31 '12 at 0:28
I run Arch on a considerably less capable machine (athlon XP 1800+ laptop) and vim works fine. Is it slow in graphical mode, or only in console mode? If it's slow in the console only, I had the same issue, and I solved it by fiddling with the drivers and enabling KMS (I don't remember exactly what I did, since it was some time ago). – user55325 May 31 '12 at 4:31
Is it slow on all files or just some particular ones? I've met large XML files that bring Vim to a halt with syntax HL on. Best effort is then to just disable syntax HL for the time being. – Daniel Andersson May 31 '12 at 7:15
up vote 1 down vote accepted

I solved it by compiling from source. I don't know why but when I install from the official arch linux repo it runs slower.

share|improve this answer

I have never used vim. There are very few things that can cause a program to slow down a great deal. What does your top say? Is it consuming cpu? Or is the program trashing to disk?

Since you say you got it from the sources, how did you compile it? Does the vc log say anything about the slowness? May be you could try build a last semi-stable revision instead of TOT.

share|improve this answer
I got it from the official arch linux repo. It is binary, not the source. I already tried more than one stable version but I get the same. What if I grant max priority to vim process? Would that help? I don't remember how to do that right now, I'll search how to do that and will try and post the results – Jesse May 31 '12 at 1:05
Can you give us an example file so I can try to repro it on my machine? – Ravi Jun 2 '12 at 2:24

one possible source of slowness is the highlighting of matching braces/brackets. you could add let loaded_matchparen = 1 to your .vimrc to avoid highlighting the brackets. that should make vim a bit faster. I don't know if that is your issue though.

share|improve this answer

You must log in to answer this question.

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