Correctly indent code with Notepad++

notepad

Can Notepad++ correctly indent code?

If I had this:

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

Is there a way of turning it into the following?

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

Best Answer

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.

Related Question