vim 以红色突出显示所有内容 [英] vim highlighting everything in red

查看:75
本文介绍了vim 以红色突出显示所有内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在脚本执行时向 python 脚本添加了一行打印,现在当我打开文件时所有文本都以红色突出显示.打开和关闭文件不会摆脱它.打开第二个 python 文件暂时解决了问题,但随后关闭文件并重新打开又将问题带回来.现在它根本不会消失.有谁知道这可能是什么原因造成的?

I added a print line to a python script while the script was executing, and now all the text is highlighted in red when I open the file. Opening and closing the file doesn't get rid of it. Opening a second python file momentarily fixed the problem, but then closing file and reopening brought the problem back. Now it wont go away at all. Any body know what could cause this?

推荐答案

当 vim 在多行注释上突出显示语法时,有时会发生这种情况.有时,多行注释之后的所有内容也会变成与注释相同的颜色.

This happens sometimes in vim when it goes to highlight syntax on multi-line comments. Occasionally everything after the multi-line comment also becomes colored the same as the comment.

我不确定这是 vim 中的合法错误,还是 Python 的实际语法设置中的错误(例如 python.vim),但我肯定会不时体验到这种情况.

I am unsure whether this is a legit bug in vim, or in the actual syntax settings for Python (e.g. python.vim), but I definitely experience this from time-to-time.

这篇关于vim 以红色突出显示所有内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆