Take the 2-minute tour ×

In Dreamweaver typing </ will automatically close the last open tag, so you don't have to type it all out, and it helps if you aren't sure if you closed one or not. Is there a plugin that dose this for Notepad++?

This is not like text FX where typing the opening tag/bracket adds the close on the other side of the cursor. This behavior is an auto completion that happens when </ is typed, DW finds whatever the innermost open tag is, and closes it. I find that, when I have the option of using DW, I will use this feature far more often than anything else that DW provides. Thus I would love to know if there was a way to do it in NPP.

Here is DW preference in question:
enter image description here
Notice how there is a different option that does what text FX does, but I don't want that.

I am not opposed to unorthodox suggestions, some kind of macro, or hack of a plugging. Anything to emulate the functionality. If need be, I could write a plugin, I just have no idea how to go about it.

share|improve this question
So is there nobody that knows of somthing like this? Any idea how dfficult it would be to implement? –  zeel Jan 10 '12 at 18:19
Simply, use Dreamweaver.... :) –  Sachin Shekhar May 11 '12 at 7:44
I would, if I could afford to. I have had times in the past where I had access to using DW, and I loved it, but I do not have the means to own it for myself. –  zeel May 11 '12 at 10:40
Eclipse does autocomplete, though I do think its too heavyweight for just editing html. +1 for the question, I use NPP too and would be nice to have such a plugin –  Alok May 14 '12 at 17:12
Less than 24 hours to go. Still none of the answers are deserving of the bounty. It will go unrewarded if nobody gives a better one. –  zeel May 17 '12 at 2:28

6 Answers 6

Go to TextFX / TextFX Settings and check "auto close XHTML tags".

This makes it work in plain HTML files as well.

share|improve this answer
No, you see that isn't the same thing. That automatically adds the end tag once you type the opening. so typing <p> gets you <p>|</p> where the | is the typing bar. I want it to give me a close after typing </, the way it dose in Dreamweaver. Dw will find whatever the next open tag is and close it if you type </ you can have 25 open tags and type </ 25 times and they would all be closed in proper order. TextFX is nice when creating a page, but editing it later if I wrap a section in, say, a div I would have to go find the end and type it. Some times that can be a problem. so +1 to Dw –  zeel Jul 3 '11 at 4:20
I think no problem in that as you will select the tag in N++ it will highlight the tags from open and close positions. –  avirk May 15 '12 at 3:17
Surprisingly, this doesn't work for me. –  Lev Apr 8 at 11:44

This thread may be pretty old, but here is the answer. Use the Plugin Manager (Plugins -> Plugin Manager) and install XML Tools.

Once installed, XML Tools will show up in the Plugins menu item and within its functionality is a "Tag auto close" option.


share|improve this answer
Nope, same thing that TextFX will do. And as I ahve noted, I am not looking for that. I want my closing tage created when I ask for it (in DW I just type '</') not as soon as I complete the first one. –  zeel Sep 27 '12 at 3:32

Very partial answer:

Do not enable in TextFX / TextFX Settings the option "Auto close XHTML/XML ".

Go to the Settings -> Preferences dialog box. Click in the Backup / Auto-completion tab and set the Enable auto-completion option.

This will only let you choose the ending tag name from its prefix.

Personally, I would prefer for Notepad++ the answer of @user79590 over my answer. If both answers are not satisfactory, then I would look for another HTML editor, since I don't believe any other possibility exists for Notepad++.

share|improve this answer
While that is a nice feature, I still have to type the first letter of the tag name ("</d" for a div) and then select the name from the list. The Dreamweaver functionality is automatic. –  zeel May 11 '12 at 10:39
I don't believe this exists in exactly the same way in Notepad++ or any existing plugin. –  harrymc May 11 '12 at 12:10
Then the question stands, how would I do it? –  zeel May 11 '12 at 12:47
Change to another editor. From my personal experience I believe that Eclipse works by default the way you wish. Another excellent editor is IntelliJ IDEA (where this is a setting). Both are free and awesome development environments, rather than just editors. An very large list of more editors is to be found in Best Free HTML Editor. –  harrymc May 11 '12 at 13:30
While that could be an option, I like NPP, and would still like to find a way to do this in it. –  zeel May 11 '12 at 14:06

Maybe you could use HTMLKit which has the shortcut 'ALT+END' which will end your current tag. Maybe N++ has something like that hidden...

share|improve this answer
Were I to use that I could certainly fake the DW functionality with AHK to turn a </ into an ALT+END. However I do not know of any similar shortcut in NPP. Any one who does might want to pipe in, because they might just get the bounty. –  zeel May 17 '12 at 20:28

Yes, it's possible to do in Notepad++, and it's very easy to do. Follow these steps:

  1. Go to Settings.
  2. Click on the Preferences tab.
  3. Now click on Auto Completion. Here, you will see two sections: one is Auto Completion, and the other is Auto Insert.
  4. In the Auto Insert section, click on the check box which says HTML/XML Close Tags.
share|improve this answer
Once again this is not what I am looking for, I am well aware of this option and it has been suggested before. This behavior is not at all what I am looking for, this ads the closing tag once the open tag is entered, and places the cursor between them. As I have noted to others, I don't want it to do that - I want it to auto complete the closing tag once I start to type the closing tag. This is a feature present in Dreamweaver, type </ and it will complete to the first unclosed tag. –  zeel May 6 at 20:59

If none of the answers above do what you want, you can also submit a feature request to the developer of Notepad++ here:


Or, you could develop the plug-in yourself and submit it to the developer.

share|improve this answer

Your Answer


