Format / Indent XML/HTML in Notepad++

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.


    Since I upgraded to 6.3.2, I use XML Tools .

  • install XML Tools via the Plugin Manager.
  • use the shortcut Ctrl+Alt+Shift+B (or menu -> Plugins -> XML Tools -> Pretty Print)
  • In older versions: menu -> TextFX -> HTML Tidy -> Tidy: Reindent XML.


    Install Tidy2 plugin. I have Notepad++ v6.2.2, and Tidy2 works fine so far.


    For those who don't know, npp has a lot of support from plugins and other projects. You can download those plugins from SourceForge.

    在这里输入图像描述

    You need XML Tools to format your text in n++

    After you have downloaded XML Tools ..

    Exit Notepad++

    Go To C:Program FileNotepad++ .... Your N++ installed folder.

  • Place below files from xml tools which you downloaded in the npp root folder by copy replace
  • Go To ..Plugins subfolder and place below downloaded file
  • Restart and enjoy!!!

    Ctrl + Alt + Shft + B to format.

    链接地址: http://www.djcxy.com/p/36608.html

    上一篇: 打开一个链接打开一个新窗口(不是选项卡)

    下一篇: 在Notepad ++中格式化/缩进XML / HTML