Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
775 views
in Technique[技术] by (71.8m points)

indentation - Notepad++: disable auto-indent after empty lines

I find the autoindent style of Notepad++ a little weird: when I am typing on an indented line, I do want it to indent the next line after I press Enter (this it does properly). However, when I am on an empty line (no indentation, no characters) and I press Enter, it indents the next line, using the same indentation as the last non-empty line. I find this extremely annoying; have you ever encountered this problem and do you know how to fix it?

(Note: I'm editing HTML/PHP files.)

(Also, suggestions of other good free editors for HTML/PHP are welcome, in case there is no way of changing this behaviour.)

question from:https://stackoverflow.com/questions/118728/notepad-disable-auto-indent-after-empty-lines

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

1) First install NppAutoIndent plugin if you don't have it.

Plugins > Plugin Manager > Show Plugin Manager, then install NppAutoIndent from the "Available" tab of that menu.

2) This behavior can be turned off by doing:

Plugins > NppAutoIndent > Previous line

3) If this option is disabled, you may need to first check this option:

Plugins > NppAutoIndent > Ignore language


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...