记事本++缩进弄乱了 [英] Notepad++ indentation messes up

查看:145
本文介绍了记事本++缩进弄乱了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Python进行编码,我真的很喜欢Notepad ++.但是,当我使用制表符进行缩进时,在Notepad ++中看起来还不错,但是当我运行该程序时,出现了缩进错误,并且当我在Emacs中检查代码时,我发现Notepad ++实际上比制表符添加了更多的制表符空间.它显示在屏幕上.发生什么事了?

I'm coding in Python and I really like Notepad++. However, off late when I use tab to indent, it seems fine in Notepad++, but when I run the program I get an indentation error, and when I check my code in Emacs or something, I find that Notepad++ actually adds more tab spaces than it shows on screen. What is happening?

推荐答案

没有通用的制表符大小,因此我始终确保用空格替换制表符(这样您就知道在其他地方也能看到什么)

There is no universal tab size, so I always make sure to replace tabs by spaces (so you know what you see is what you get everywhere else as well)

转到设置"->首选项..."->语言"菜单/制表符"设置,然后选中按空格替换"

Go to Settings -> "Preferences..." -> Language Menu/Tab Settings and check 'Replace by space'

这篇关于记事本++缩进弄乱了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆