(vim profiling) VIM 256 colors mode, laggy php files
-
30-09-2019 - |
문제
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.
해결책
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!'
제휴하지 않습니다 StackOverflow