当前位置:网站首页>sublime text的编写程序时的Tab和空格缩进问题
sublime text的编写程序时的Tab和空格缩进问题
2022-07-06 08:27:00 【MAR-Sky】
参考:https://blog.csdn.net/fjnjxr/article/details/79635504
设置缩进的Tab=4个空格
问题描述,下图中是一个简单的测试程序,发现会出现编译错误,IndentationError: unindent does not match any outer indentation level,大概意思就是缩进没有对齐匹配。sublime中经常遇到这种情况,参考链接中的是英文版的修改方式,自己记录一下使用的修改方式,

修改过程和分析
分析,将缩进改为四个字符的空格缩进,因为设置成Tab缩进的话若键入四个空格还是会报错,但设置成空格的话,Tab键会自动转换成4个空格。下面是修改步骤,但修改后只对后来的键入有作用,如果修改前的缩进很混乱,那么使用图中所示的转换为空格缩进。
边栏推荐
- 使用 BR 恢复 S3 兼容存储上的备份数据
- Image fusion -- challenges, opportunities and Countermeasures
- 2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
- Browser thread
- IOT -- interpreting the four tier architecture of the Internet of things
- 从表中名称映射关系修改视频名称
- PLT in Matplotlib tight_ layout()
- Pyqt5 development tips - obtain Manhattan distance between coordinates
- Pointer advanced --- pointer array, array pointer
- 延迟初始化和密封类
猜你喜欢
![[cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes](/img/ac/773ce8ee7f380df19edf8373250608.jpg)
[cloud native topic -45]:kubesphere cloud Governance - Introduction and overall architecture of enterprise container platform based on kubernetes

2022.02.13 - 238. Maximum number of "balloons"

The resources of underground pipe holes are tight, and the air blowing micro cable is not fragrant?

Pyqt5 development tips - obtain Manhattan distance between coordinates

IoT -- 解读物联网四层架构

leetcode刷题 (5.28) 哈希表

指针和数组笔试题解析

Precise query of tree tree

Circular reference of ES6 module

Deep learning: derivation of shallow neural networks and deep neural networks
随机推荐
2022.02.13 - NC002. sort
Report on Market Research and investment prospects of China's silver powder industry (2022 Edition)
CISP-PTE实操练习讲解
leetcode刷题 (5.29) 哈希表
【ROS】usb_cam相机标定
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
2022.02.13 - NC003. Design LRU cache structure
2022 Inner Mongolia latest water conservancy and hydropower construction safety officer simulation examination questions and answers
[MySQL] database stored procedure and storage function clearance tutorial (full version)
【MySQL】锁
Pyqt5 development tips - obtain Manhattan distance between coordinates
Introduction to number theory (greatest common divisor, prime sieve, inverse element)
使用 TiDB Lightning 恢复 S3 兼容存储上的备份数据
FairGuard游戏加固:游戏出海热潮下,游戏安全面临新挑战
Leetcode question brushing (5.31) string
Hcip day 16
[secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
【Nvidia开发板】常见问题集 (不定时更新)
LDAP Application Section (4) Jenkins Access
Online yaml to CSV tool