[英]Why is the word file get highlighted in .py files in the Vim text editor?
The word "file" in python is not a keyword, but my Vim highlights it as if it were. python 中的“文件”这个词不是关键字,但我的 Vim 将它突出显示出来。 Can someone suggest a fix and explain this strange behaviour?
有人可以建议修复并解释这种奇怪的行为吗? It keeps messing with me.
它一直在惹我。 It bothers me every time I look at it.
每次看都让我很困扰。
I think I use regular Vim—I haven't tinkered with my .vimrc much, certainly not with the syntax highlighting.我想我使用的是普通的 Vim——我没有对我的 .vimrc 进行太多修改,当然也没有使用语法高亮。
Many builtins were removed in the Python 2 to 3 transition.在 Python 2 到 3 的过渡中删除了许多内置函数。
file
is one of them. file
就是其中之一。 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.
现在 Python 2 不再受支持,维护人员可能愿意将它们从列表中删除,因此如果它困扰您,您可以尝试打开一个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.