Python 如何将 Spyder 编辑器背景更改为深色?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/40595961/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change the Spyder editor background to dark?
提问by CiaranWelsh
I've just updated Spyder to version 3.1 and I'm having trouble changing the colour scheme to dark. I've been able to change the Python and iPython console's to dark but the option to change the editor to dark is not where I would expect it to be. Could anybody tell me how to change the colour scheme of the Spyder 3.1 editor to dark?
我刚刚将 Spyder 更新到 3.1 版,但无法将配色方案更改为深色。我已经能够将 Python 和 iPython 控制台更改为暗色,但是将编辑器更改为暗色的选项并不是我所期望的。有人能告诉我如何将 Spyder 3.1 编辑器的配色方案更改为深色吗?
回答by Carlos Cordoba
If you're using Spyder 3, please go to
如果您使用的是 Spyder 3,请访问
Tools > Preferences > Syntax Coloring
Tools > Preferences > Syntax Coloring
and select there the dark theme you want to use.
并在那里选择您要使用的深色主题。
In Spyder 4, a dark theme is used by default. But if you want to select a different theme you can go to
在 Spyder 4 中,默认使用深色主题。但是如果你想选择一个不同的主题,你可以去
Tools > Preferences > Appearance > Syntax highlighting theme
Tools > Preferences > Appearance > Syntax highlighting theme
回答by Allen
Tools->Preferences->Syntax coloring->Scheme changed to "Spyder Dark"
回答by marts
For Spyder 2.3 which is still installed via apt-get on linux, you change the theme via
对于仍然通过 apt-get 在 linux 上安装的 Spyder 2.3,您可以通过更改主题
Tools > Preferences > Editor > Syntax Color
The
这
Tools > Preferences > Syntax Coloring
only shows options for adjusting the different themes, but not actually applying a different theme. Spyder 3.x uses the second option via Syntax Color.
仅显示用于调整不同主题的选项,但并未实际应用不同的主题。Spyder 3.x 通过语法颜色使用第二个选项。
回答by ewalel
回答by Michael Litvin
回答by SOBrien
I think some of the people answering this question don't actually try to do what they recommend, because there is something wrong with way the Mac OS version handles the windows.
我认为回答这个问题的一些人实际上并没有尝试做他们推荐的事情,因为 Mac OS 版本处理 Windows 的方式有问题。
When you choose the new color scheme and click OK, the preferences window looks like it closed, but it is still there behind the main spyder window. You need to switch windows with command ~ or move the main spyder window to expose the preferences window. Then you need to click Apply to get the new color scheme.
当您选择新的配色方案并单击确定时,首选项窗口看起来像是关闭了,但它仍然在主 spyder 窗口后面。您需要使用命令 ~ 切换窗口或移动主 spyder 窗口以显示首选项窗口。然后您需要单击应用以获取新的配色方案。
回答by Yuval Harpaz
I like matching the editor dark scheme to IPython dark scheme. As for IPython, go to
我喜欢将编辑器暗色方案与 IPython 暗色方案相匹配。至于IPython,去
Tools > Preferences > IPython cosole > display tab
and check Dark background
.
并检查Dark background
。
Restart the kernel. Then look at the colors you get, say, when you import. My spyder2 (python 2.7) uses Anaconda's ipython 5.3.0 and import is pink, the best matching scheme for the editor is Monokai, you choose this in
重新启动内核。然后看看你得到的颜色,比如,当你导入时。我的spyder2(python 2.7)用的是Anaconda的ipython 5.3.0,import是粉色的,编辑器的最佳搭配方案是Monokai,你选这个
Tools > Preferences > Syntax coloring
My spyder3, when choosing dark IPython (2.4.1) background prints colors a bit different than Monokai, but if you go to
我的 spyder3,在选择深色 IPython (2.4.1) 背景时打印的颜色与 Monokai 有点不同,但如果你去
Tools > Preferences > Syntax coloring
you go to Monokai
tab and tweak the colors a bit. I had to change builtin from lilac to cyan
您转到Monokai
选项卡并稍微调整颜色。我不得不将内置从淡紫色更改为青色
回答by D.Wolf
I tried the option: Tools > Preferences > Syntax coloring > dark spyder is not working.
我尝试了以下选项:工具 > 首选项 > 语法着色 > 深色 spyder 不起作用。
You should rather use the path: Tools > Preferences > Syntax coloring > spyder then begin modifications as you want your editor to appear
您应该使用路径:工具 > 首选项 > 语法着色 > spyder 然后开始修改,因为您希望编辑器出现
回答by NicoleEickhoff
@D.Wolf -- if Preferences doesn't appear in the drop-down under Tools, there is also an icon in the toolbar that is a direct path to tools -> Preferences, and the Syntax Coloring is on the left-hand side. See the wrench? Just click that.
@D.Wolf -- 如果工具下的下拉菜单中没有出现 Preferences,那么工具栏中还有一个图标是工具的直接路径 -> Preferences,语法着色在左侧. 看到扳手了吗?只需点击它。
回答by Peter Farrell
On mine it's Tools --> Preferences --> Editor and "Syntax Color Scheme" dropdown is at the very bottom of the list.
在我的是工具 --> 首选项 --> 编辑器和“语法颜色方案”下拉列表位于列表的最底部。