分享

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

 weicat 2010-07-27

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.

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多