How To Auto-Format / Indent XML/HTML in Notepad++

Web Development

Is there a way to re-indent a block of code? I'm looking for something similar to Ctrl+Shift+F in Eclipse (Auto-Format/Indent).

To be clear,

I already know how to format XML outside of Notepad++ (Eclipse works fine, as mentioned) so I don't need a bunch of links to other XML-formatting tools.

I'm specifically working with XML and HTML.

Ideally, there's a keybinding as convenient as the one in Eclipse, so I don't have to break my workflow.

I already know about NppAutoIndent - it won't work, as I'm working with XML, HTML, and CSS.



Ans: You can use the XML tools if you are working on the version: 6.3.2.

The primary step is to install the XML tools using the Plugin Manager. Then navigate to Menu -> Plugins -> XML Tools -> Pretty Print. 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.


If you want to unleash your potential in this competitive field, please visit the Web Development course page for more information, where you can find the Web Development tutorials and Web Development frequently asked interview questions and answers as well.


This topic has been locked/unapproved. No replies allowed

Login to participate in this discussion.

Leave a reply

Before proceeding, please check your email for a verification link. If you did not receive the email, click here to request another.