Vim response quite slow

后端 未结 5 2078
一向
一向 2021-02-06 01:03

If I open a file containing 5,000 lines of code and continue to input, I found that my vim became very slow, it displays my input after about 1s.

It even won\'t become

5条回答
  •  后悔当初
    2021-02-06 01:31

    Add these lines to your ~/.vimrc or ~/.config/nvim/init.vim:

    set lazyredraw   " don't redraw everytime
    set synmaxcol=128  " avoid slow rendering for long lines
    syntax sync minlines=64  " faster syntax hl
    

    Also if you're using tmux, consider adding this to your ~/.tmux.conf:

    set -sg escape-time 10
    

提交回复
热议问题