vim is slow, even on console without X running

0

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?

Jesse

Posted 2012-05-30T23:37:58.097

Reputation: 107

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 – 2012-05-31T00:28:07.190

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 – 2012-05-31T04:31:45.177

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 – 2012-05-31T07:15:53.213

Answers

1

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.

Jesse

Posted 2012-05-30T23:37:58.097

Reputation: 107

0

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.

Ravi

Posted 2012-05-30T23:37:58.097

Reputation: 101

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 – 2012-05-31T01:05:38.720

Can you give us an example file so I can try to repro it on my machine? – Ravi – 2012-06-02T02:24:56.577

0

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.

Alex

Posted 2012-05-30T23:37:58.097

Reputation: 190