Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In Visual Studio, (and a few other Microsoft editors), you can auto format a document with a simple Ctrl + K, Ctrl + D.

This inserts line breaks and tabbing automatically.

Is there a similar feature in Notepad++? I love Notepad++ but without auto format it feels a bit incomplete!

share|improve this question

4 Answers 4

up vote 14 down vote accepted

TextFX has the options to insert line breaks and tabbing?

TextFX

share|improve this answer

Download and use the plugin NppAutoIndent in Notepad++.In your Notepad++:

Plugins -> Plugin manager -> Available -> NppAutoIndent

NppAutoIndent plugin has 'smart' indentation for C-style languages, such as C/C++, PHP, Java and such.
It's the first release so don't expect it to be flawless, and of course it might not be completely to your preferences ;) There is NO support for HTML/XML and such, maybe later, tag matching is much more difficult to implement.
To use it select your code and:

TextFX -> TextFX Edit -> Reindent C++ code

Look at:
sourceforge
stackoverflow

Update:
If you can not see TextFX in your menu,you can install it's plug in(from here) and probably you can see TextFX Edit -> Reindent C++ code in it,after installing.You can see more details in these pages:
Reindenting C Source Code Files With Notepad++

share|improve this answer

For markup / xml there's a plugin called 'XML Tools'.

This can be added via the plugin manager inside Notepad++.

share|improve this answer
1  
It can't seem to clean HTML it just says errors in the document without telling me what they are. –  Matthew Lock Jan 11 '13 at 8:32

For JavaScript, the JSMinNpp plugin will do this job.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.