为什么Word文件在VIM文本编辑器中的.py文件中突出显示?

发布于 2025-01-23 07:14:07 字数 325 浏览 2 评论 0原文

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.

Wired syntax highlighting of file

Extra info

I think I use regular Vim—I haven't tinkered with my .vimrc much, certainly not with the syntax highlighting.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

杀お生予夺 2025-01-30 07:14:07

在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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文