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
656 views
in Technique[技术] by (71.8m points)

notepad++ - Notepad ++中的自动缩进(Auto-indent in Notepad++)

We always write code like this formal:

(我们总是写这样正式的代码:)

void main(){
  if(){
    if()
    }

替代文字

But when I use Notepad++ , the display is:

(但是当我使用Notepad ++时 ,显示为:)

void main(){
if(){
if()
}

替代文字

How do I use Notepad++ to auto indent?

(如何使用Notepad ++自动缩进?)

Thanks to Jonathan , I have set it, but it does not take any effect.

(感谢Jonathan ,我已经设定了它,但它没有任何效果。)

The snapshot is below:

(快照如下:)

替代文字

I am using Notepad++ version 5.1.3.

(我正在使用Notepad ++版本5.1.3。)

  ask by community wiki translate from so

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

1 Reply

0 votes
by (71.8m points)

Notepad++ will only auto-insert subsequent indents if you manually indent the first line in a block;

(如果您手动缩进块中的第一行,Notepad ++将仅自动插入后续缩进;)

otherwise you can re-indent your code after the fact using TextFX > TextFX Edit > Reindent C++ code .

(否则,您可以使用TextFX > TextFX Edit > Reindent C++ code重新缩进TextFX > TextFX Edit > Reindent C++ code 。)


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

...