Formatting Code in Notepad++

Formatting code in Notepad++

TextFX -> HTML Tidy -> Tidy: Reindent XML

Remember to have the HTML code selected before you do this.

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

Since I upgraded to 6.3.2, I use XML Tools.

  • install XML Tools via the Plugin Admin (Plugins → Plugins Admin... Then search for "XML Tools", check its box and click the "Install" button).
  • use the shortcut Ctrl+Alt+Shift+B (or
    menu → Plugins → XML Tools → Pretty Print)

Sample Image

Sample Image

In older versions:
menu → TextFX → HTML Tidy → Tidy: Reindent XML.

How do I format XML in Notepad++?

Try Plugins -> XML Tools -> Pretty Print (libXML) or (XML only - with line breaks Ctrl + Alt + Shift + B)

You may need to install XML Tools using your plugin manager in order to get this option in your menu.

In my experience, libXML gives nice output but only if the file is 100% correctly formed.

How to format a document in Notepad++

Download XML Tools plugin from NotePad++->Plugins->XML Tools.. Use Ctrl+Alt+Shift+B to format your XML document..

Reformat Code in Notepad++

TextFX hasn't been updated for a long time. A more powerful choice is UniversalIndentGUI.

How can I indent HTML or PHP code in Notepad ++ editor?

If you want auto-formatting, look at SourceFormatX, which is a paid plug-in for Notepad++.

Other than that, there are a few free plug-ins available on the Notepad++ Wiki which will format either HTML or PHP code.



Related Topics



Leave a reply



Submit