Question

I'm using 256-colors theme in vim (set t_Co=256) and all php files opens about 8 seconds.

  • It's my local dual-core machine
  • It doesn't depend on color scheme I used (zenburn, wombat, wombat256)
  • HTML, Python, JS or every else files opens momentary
  • It takes about 8 sec even to create new php files (:o newfile.php)
  • I've setting up my terminal correctly
  • Everything fine if I'm using 16 colors (set t_Co=16)

I really want to use 256-colors mode, it looks much prettier, but I can't get rid of this lags.

Was it helpful?

Solution

Right way to find what cause performance problems in VIM is to profile it or check debug output (optionally - comparing with vim setup without troubles).

Comparing debug output:

vim -c 'set verbosefile=./vim1.log verbose=12' -c 'command that causes problem' -c 'qa!'
vim -c 'set verbosefile=./vim2.log verbose=12' -c 'qa!'
diff ./vim1.log ./vim2.log

In some cases you can also increase verbose level up to 15

Profiling:

vim -c 'profile start ./vim.profile' -c 'profile func *' -c 'profile file *' -c 'command that causes problem' -c 'qa!'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top