为什么Word文件在VIM文本编辑器中的.py文件中突出显示?
python中的“文件”一词不是关键字,但我的vim会像它一样强调它。有人可以建议修复并解释这种奇怪的行为吗?它不断与我混乱。每当我看着它时,这都会困扰我。
我认为我使用常规vim的额外信息
- 我没有对.vimrc进行太多修补,当然不是语法突出显示。
The word "file" in python is not a keyword, but my Vim highlights it as if it were. Can someone suggest a fix and explain this strange behaviour? It keeps messing with me. It bothers me every time I look at it.
Extra info
I think I use regular Vim—I haven't tinkered with my .vimrc much, certainly not with the syntax highlighting.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在Python 2到3过渡中,许多内置的属性被删除。
文件
是其中之一。许多语法荧光笔仍然突出显示它们。现在,Python 2不再支持,维护者可能愿意将其从列表中删除,因此,如果您困扰您,您可以尝试打开问题。Many builtins were removed in the Python 2 to 3 transition.
file
is one of them. Lots of syntax highlighters still highlight them. Now that Python 2 is no longer supported, maintainers may be willing to remove them from the lists, so you can try opening an issue if it bothers you.