在 Python 的 Spyder 编辑器中更改缩进设置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/36187784/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 17:31:27  来源:igfitidea点击:

Changing indentation settings in the Spyder editor for Python

pythonindentationspyder

提问by denvar

I am using the Spyder editor for Python. I need to change the indentation setting (e.g., let "tab" mean "4 spaces").

我正在使用 Python 的 Spyder 编辑器。我需要更改缩进设置(例如,让“制表符”表示“4 个空格”)。

How do I accomplish this?

我该如何实现?

回答by Vadim Shkaberda

Tools >>> Preferences >>> Editor >>> Advanced settings >>> Indentation characters

工具 >>> 首选项 >>> 编辑器 >>> 高级设置 >>> 缩进字符

回答by Rituraj Rautela

go to >>>Tools in the menu bar

转到菜单栏中的 >>> 工具

Preferences >>> Editor >>> Advanced settings >>> Indentation characters

首选项 >>> 编辑器 >>> 高级设置 >>> 缩进字符

set indentation characters: to "4 spaces"

将缩进字符设置为“4 个空格”

hurray! Mission accomplished

欢呼!任务完成

回答by Johnny Wu

On Mac w/ Spyder 4.0.1, it's

在装有 Spyder 4.0.1 的 Mac 上,它是

Python -> Preference -> Editor -> Source Code (tab) -> Indentation characters

Python -> Preference -> Editor -> Source Code (tab) -> Indentation characters