Posts tagged ‘syntax’

Vim slow on long lines with syntax enabled

Vim is my default text editor. Besides coding, I also use vim with the Hammer plugin to do most my basic word processing.

One major annoyance I’ve found is that terminal vim responds extremely slowly when dealing with files that contain long lines (.e.g. xml, markdown, php, etc.).

Some simple changes in ~/.vimrc to overcome this:

52
53
54
55
" set max syntax columns to prevent lag on long lines (default: 3000)
set synmaxcol=128
" disable cursorline (default: nocursorline)
set nocursorline "

To compensate for loss of the visual aid in the cursorline, in my vim theme and ~/.Xresources, I changed my cursor colour from the default grey/white to yellow.