如何在 VS 代码中突出显示 VS 的 python 语法? [英] How can I get VS's python syntax highlighting in VS code?

查看:47
本文介绍了如何在 VS 代码中突出显示 VS 的 python 语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎带有 Python 工具的 VS 社区比带有Python"的 VS Code 具有更好的语法突出显示,由 Don Jayamanne 编写.正如您在附图中看到的,VS 社区以 ¿ 紫色高亮显示?导入的包和用于类的浅蓝色,而 VS 代码则没有.

It seems like VS Community with python tools has a better syntax highlighting than VS Code with "Python" by Don Jayamanne. As you can see in the picture attached, VS Community highlights in ¿purple? the packages imported, and lightblue for classes while VS code just don't.

推荐答案

我遇到了同样的问题,一些 VS Code 主题至少不支持语法高亮显示.我尝试过 Ruby 和 Python,我使用的主题是 Dark(Visual Studio).

I ran into the same issue and some VS Code themes are not supporting syntax highlighting atleast for me. I tried with Ruby and Python and the theme I was using was Dark(Visual Studio).

更改为暗+(默认暗)对我有用.

Changing to Dark+ (Default Dark) did the trick for me.

转到首选项 -> 颜色主题,然后选择暗色+(默认暗色) 或类似内容.

Goto Preferences -> Color Themes and choose Dark+(Default Dark) or something similar.

希望有帮助.

这篇关于如何在 VS 代码中突出显示 VS 的 python 语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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