Reputation: 22675
How do I start vim with syntax highlighting off? Vim is taking a long time to highlight syntax for large XML files for me.
Upvotes: 5
Views: 2596
Reputation: 31040
You can start vim with
vim -c 'syn off'
Or you can specify that it should turn it off for large XML files by making an ftplugin file. For instance put
if getfsize(expand('%')) > 400000
syntax off
endif
in a file named ~/.vim/ftplugin/xml.vim
Upvotes: 18
Reputation: 23556
You need to disable syntax highlighting. You can do that (and few additional options that can be useful in such situation) by following this instruction on Vi SE.
Upvotes: 0