当前位置:网站首页>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个空格。下面是修改步骤,但修改后只对后来的键入有作用,如果修改前的缩进很混乱,那么使用图中所示的转换为空格缩进。
边栏推荐
- 2022.02.13 - NC004. Print number of loops
- Pyqt5 development tips - obtain Manhattan distance between coordinates
- China vanadium battery Market Research and future prospects report (2022 Edition)
- C language - bit segment
- 【MySQL】锁
- [secretly kill little partner pytorch20 days -day01- example of structured data modeling process]
- matplotlib. Widgets are easy to use
- Verrouillage [MySQL]
- leetcode刷题 (5.31) 字符串
- 华为云OBS文件上传下载工具类
猜你喜欢
Résumé des diagrammes de description des broches de la série ESP
[research materials] 2022 China yuancosmos white paper - Download attached
hcip--mpls
ESP series pin description diagram summary
2022.02.13 - NC004. Print number of loops
Chrome浏览器的crash问题
Online yaml to CSV tool
JVM performance tuning and practical basic theory - Part 1
【MySQL】鎖
FairGuard游戏加固:游戏出海热潮下,游戏安全面临新挑战
随机推荐
2. File operation - write
游戏解包的危害及资源加密的重要性
Let the bullets fly for a while
Pyqt5 development tips - obtain Manhattan distance between coordinates
IoT -- 解读物联网四层架构
Ruffian Heng embedded bimonthly, issue 49
Migrate data from CSV files to tidb
Online yaml to CSV tool
ROS编译 调用第三方动态库(xxx.so)
JS pure function
On the day of resignation, jd.com deleted the database and ran away, and the programmer was sentenced
Roguelike游戏成破解重灾区,如何破局?
Restore backup data on S3 compatible storage with br
化不掉的钟薛高,逃不出网红产品的生命周期
Grayscale upgrade tidb operator
ESP系列引脚说明图汇总
LDAP應用篇(4)Jenkins接入
Summary of MySQL index failure scenarios
指针进阶---指针数组,数组指针
[research materials] 2022 China yuancosmos white paper - Download attached