简体   繁体   English

无法在 VS Code 中更改主题?

[英]Unable to change theme in VS Code?

am not getting any error or anything, but VS code by default always switches to a Dark+ (default dark), even if in my system setting I have selected Light theme (I have a MacBook Air).我没有收到任何错误或任何东西,但默认情况下 VS 代码总是切换到 Dark+(默认为深色),即使在我的系统设置中我选择了 Light 主题(我有 MacBook Air)。 This is too much frustrating and I also uninstalled and installed VS Code 2-3 times and am unable to change the behaviour.这太令人沮丧了,我还卸载并安装了 VS Code 2-3 次,无法改变行为。 Please let me know if you need any additional info with this question, I will provide it.如果您需要有关此问题的任何其他信息,请告诉我,我会提供。

An additional point on this problem, when I press CMD +, to open setting, and under appearance, I change the Color Theme, it let me change.关于这个问题的补充点,当我按CMD +,打开设置,在外观下,我改变颜色主题,它让我改变。 And then when I open a file (a python file suppose) or just switch to an opened file it changes back to Dark+ (default dark).然后当我打开一个文件(假设是 python 文件)或只是切换到打开的文件时,它会变回 Dark+(默认为深色)。 I don't know how to solve this behaviour.我不知道如何解决这种行为。 Please help.请帮忙。

I think VS Code is just doesn't follow the system theme (I observed this in my Windows 10 machine).我认为 VS Code 只是不遵循系统主题(我在我的 Windows 10 机器上观察到了这一点)。 Also cmd+, is not the place to change VS code theme.另外cmd+,不是更改 VS 代码主题的地方。

You can try Cmd P and enter >color theme to select a theme.你可以试试Cmd P并输入>color theme到 select 一个主题。

在此处输入图像描述

VS code doesn't follow system theme, do cmd + K, then let go of K while holding cmd and press T. Or you can cmd + K THEN cmd + T. There you will get a menu where you will get your color options. VS code doesn't follow system theme, do cmd + K, then let go of K while holding cmd and press T. Or you can cmd + K THEN cmd + T. There you will get a menu where you will get your color options . Please upvote is helpful.请点赞很有帮助。

I reset workbench settings to default and then added the following to settings.json and it solved my problem.我将工作台设置重置为默认值,然后将以下内容添加到 settings.json 并解决了我的问题。

    "workbench.colorTheme": "GitHub Dark Default",
    "window.autoDetectColorScheme": true,
    "workbench.preferredDarkColorTheme": "GitHub Dark Default",
    "workbench.preferredLightColorTheme": "GitHub Light Default",

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM