pycharm convert tabs to spaces automatically(pycharm自动将制表符转换为空格)
问题描述
我正在使用 pycharm IDE 进行 python 开发,它对于 django 代码工作得非常好,因此怀疑将制表符转换为空格是默认行为,但是在 python IDE 中到处都会出错,因为它不能自动将制表符转换为空格.实现这一目标的方法.
I am using pycharm IDE for python development it works perfectly fine for django code so suspected that converting tabs to spaces is default behaviour, however in python IDE is giving errors everywhere because it can't convert tabs to spaces automatically is there a way to achieve this.
推荐答案
将代码样式更改为使用空格而不是制表符:
Change the code style to use spaces instead of tabs:
然后在项目视图中选择一个你想要转换的文件夹并使用Code |重新格式化代码.
Then select a folder you want to convert in the Project View and use Code | Reformat Code.
这篇关于pycharm自动将制表符转换为空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:pycharm自动将制表符转换为空格
基础教程推荐
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 包装空间模型 2022-01-01
- 求两个直方图的卷积 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
