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 on long line. Set to zero to remove the limit. |
|