So it seems this issue has been raised before, a couple of years ago but none of the responses seemed to work on the newest version of Notepad++ 6.2.2
I've also tried using the NppAutoIndent plugin to no avail.
Plugins -> Plugin Manager -> Show Plugin Manager. Search "XML TOOLS" from the "Available" option then click in install. Now you can use shortcut key CTRL+ALT+SHIFT+B to indent the code.
As described there, the auto-indent feature just keeps the same indent as the line above it. So if you indent one line while typing, Notepad++ will maintain that indentation on subsequent lines, until you change the indent level one way or the other.
You can use the shortcut Ctrl + Alt + Shift + B. For the other older versions, you need to navigate to Menu -> text FX -> HTML Tidy -> Tidy: Reindent XML.
For javascript, you can try JsMin (JsTool) plugin. It has jsformatter function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With