Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can notepad++ correectly indent code? So if I had this:

<div><div><div></div></div>   </div>

Is there a way of turning it into this:

share|improve this question
up vote 2 down vote accepted

You can use TextFX plugin to reindent code for you. If you don't have it, you will need to install in from your plugin manager. Once in place > just use the menu "TextFX" > "TextFX Edit" > "Reindent C++ code".

Probably it won't convert a single line, but actual code with miss-indentations will be handled well.

You will find more info and other plugins explained here.

share|improve this answer
The OP asked about HTML, not about C++ – CodyBugstein Feb 9 '14 at 20:44
And just to be doubly clear: the "Reindent C++ code" action does not indent my HTML code (N++ v6.5.1) – Daryn Mar 27 '14 at 21:33
@Imray Really? You don't say. – whatever Mar 28 '14 at 7:53
@Daryn At the time of writing (1 year ago) this was working. – whatever Mar 28 '14 at 7:55
@Magnum I hear you. That's why I added version number, I know these things change over time. – Daryn Mar 28 '14 at 17:48

Install Indent by Fold plugin. It works well with XML (or, derivatives) tags.

share|improve this answer

The Tidy2 plugin does exactly what you want.

share|improve this answer
Can you add more information? – Frank May 29 '14 at 14:13
A link to developer's/distributor's website and some detail on plugin would be helpful – Art Gertner May 29 '14 at 14:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .