Skip to content

Notepad++ FAQ

Automatically complete HTML tag

When I’m using tags I want to know how to get Notepad++ to close my HTML tags for me. For example, when I use <h1>Help Information< I would like the < to auto complete to the appropriate </h1> closing tag.

How can I do this? Or better, how can I get <h1> to automatically create the closing </h1> tag such as <h1></h1> and then I just type my headline between the two?

Settings > Preferences > Auto-Completion > Auto-Insert

Go to the above settings and select html/xml close tag. As soon as you finish typing a tag (e.g. <h1>) it will insert the closing tag.

Please note, you need to save a new file to *.htm extension before writing. This is the way to get the language setting HTML automatically.

The preferences dialog

Move a collapsed section to another location

Given a document in Notepad++ with the following content:

A simple XML document having some folded sections

How can one move around a collapsed elements in its entirety without first having to uncollapse the element? So that no unnecessary uncollapsing and then recollapsing steps are needed for every moving action.

It is just a little bit different to what you might think it is.

Mouse usage: Instead of selecting the line from start of the line and move the mouse to the end of the line you select the start position and move the mouse one line down.

Keyboard usage: Instead of pressing SHIFT+END you press SHIFT+Down Arrow.

  • Place the cursor at the first column of the folded unique visible line
  • Perform a Shift+Down Arrow
  • Perform a Ctrl+C or Ctrl+X
  • Open a new tab Ctrl+N or place the cursor for your needs
  • Paste the clipboard contents Ctrl+V

As expected, all contents of the folded section appears.