每个项目配置 PyCharm 暗模式

Configure PyCharm Dark Mode per Project

是否可以在逐个项目的基础上配置 PyCharm 黑暗模式?

我和我的同事共享同一台机器来 运行 一些模拟,我们都使用 PyCharm,但我们有单独的 workspace/projects。我喜欢 IntelliJ Light,但我的同事更喜欢 Darcula。那么,是否可以为不同的项目配置不同的主题呢?

可以通过默认键盘快捷键 Ctrl + `[=53= 使用 Quick Switch Scheme 操作轻松切换 UI 主题(从 IntelliJ Light 到 Darcula darkmode) ].

切换UI也可以通过面包屑File>Settings>Appearance & Behavior>Appearance > Theme 截图所示。

在撰写本文时,PyCharm 文档中可能并未完全清楚这一点,因为使用直观关键字“主题”搜索操作不会给出任何结果。

User interface themes

You can assign a shortcut to the Theme action, so that you can quickly switch between themes.

但是,IntelliJ IDE文档确实明确说明了操作的名称

Use the quick switcher

  1. Press Ctrl + ` to execute the View | Quick Switch Scheme action.


直接回答问题:

Is it possible to configure PyCharm dark mode on a project-by-project basis?

我不这么认为。主题配置是 IDE 范围内的设置,而不是项目设置。鉴于通过几次键盘敲击即可轻松更改主题,考虑到其他方法并不值得付出努力。

我尝试搜索更改主题后的 configuration files but couldn't find the Theme setting, probably because the Theme itself is a plugin that needs to run an event so the action of changing themes is more complex than a simple entry in a configuration file. For example, this is what the log file 样子:

2021-04-27 08:59:57,336 [ 416653]   INFO - cloudConfig.CloudConfigManager - === Start.Edit: [colors.scheme.xml] |false| === 
2021-04-27 08:59:57,336 [ 416653]   INFO - cloudConfig.CloudConfigManager - === Start.Edit: [laf.xml] |true| === 
2021-04-27 08:59:58,352 [ 417669]   INFO - cloudConfig.CloudConfigManager - === doConnect === 
2021-04-27 08:59:58,352 [ 417669]   INFO - cloudConfig.CloudConfigManager - === getConnectionState === 
2021-04-27 08:59:59,433 [ 418750]   INFO - cloudConfig.CloudConfigManager - === End.Update: [C:\Users\user_name\AppData\Roaming\JetBrains\PyCharm2021.1\jba_config\colors.scheme.xml, C:\Users\user_name\AppData\Roaming\JetBrains\PyCharm2021.1\jba_config\laf.xml] ===