(vim profiling) VIM 256 color mode, laggy php files

I am using 256 color theme in vim (set t_Co = 256) and all php files will open for about 8 seconds.

  • This is my local dual-core machine.
  • It does not depend on the color scheme I use (zenburn, wombat, wombat256).
  • HTML, Python, JS or all other files open instantly
  • It takes about 8 seconds even to create new php files (: o newfile.php)
  • I installed my terminal correctly
  • Everything is fine if I use 16 colors (set t_Co = 16)

I really want to use the 256-color mode, it looks much more beautiful, but I can not get rid of these lags.

+6
performance profiling vim 256color lag
source share
1 answer

The correct way to find the cause of performance problems in VIM is to profile or check the debug output (optional - comparison with vim configuration without problems).

Debug output comparison:

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 the level to 15

Profiling:

 vim -c 'profile start ./vim.profile' -c 'profile func *' -c 'profile file *' -c 'command that causes problem' -c 'qa!' 
+3
source share

All Articles