vim内过长字符串导致的语法加亮错误 - 松风 - 博客园

来源:百度文库 编辑:神马文学网 时间:2024/04/28 11:37:46

vim内过长字符串导致的语法加亮错误

keyword:VIM 3000个字符 语法错误

这是vim7以后的默认设置导致的,其目的是鼓励写出干净的代码,但如果遇到XML或加密的字符串将导致语法加亮的问题,解决办法一种是将此值设大一点,另一种是设置为0以将其关闭.

set synmaxcol=10000

set synmaxcol=0

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.