Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto indent HTML / Javascript in Notepad++

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.

like image 610
Barney Avatar asked Dec 06 '12 12:12

Barney


People also ask

How do I indent HTML in notepad?

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.

Can Notepad++ auto indent?

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.

How do I align HTML in Notepad++?

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.


1 Answers

For javascript, you can try JsMin (JsTool) plugin. It has jsformatter function.

like image 149
Sun Junwen Avatar answered Sep 20 '22 10:09

Sun Junwen