vim syntax highlight limited to 3000 chars

Solution 1:

Use :set synmaxcol=0 to remove the limit or choose any large value.

Warning: This setting may add a significant redraw delay.

Vim documentation: options - synmaxcol

'synmaxcol' 'smc' number  (default 3000)

Notes: local to buffer, not in vi

Maximum column in which to search for syntax items. In long lines the text after this column is not highlighted and following lines may not be highlighted correctly, because the syntax state is cleared. This helps to avoid very slow redrawing for an XML file that is one long line.

Set to zero to remove the limit.