I edit a lot of xml files with vim. The problem is that, because of the long lines, navigation/editing in vim is extremely slow. Is there something I can do (besides turning off
It is 2014, I am using Vim version 7.4. the syntax highlighting and Long line combination still causes vim to behave unacceptably slow. As this is the first response returned from Google I wanted to drop my "current" solutions.
I have found that simply toggling your syntax on and off after loading the offending file allows vim to behave at an acceptable pace. For convenience you can bind it
:syntax off
:syntax on
or bind it: nnoremap
I have also found that sourcing my .vimrc will produce the same result
:source $MYVIMRC
and obligatory map: nnoremap
EDIt ---- 07/31/14
Further exploration has lead me to limit the syntax with a maximum column. This has worked very well and I haven't had any problems since I've add the below to my vimrc.
set synmaxcol=250
this limits syntax generously to the first 250 columns.