3

There was a plugin for Notepad++ that would auto-complete the last open HTML or XML tag when you pressed Ctrl+.. I used this plugin for a while, but I recently reinstalled Notepad++ and can't remember what the plugin was called. Can anybody name the plugin that used this keyboard shortcut to auto-complete XML and HTML tags on demand? I think that the same plugin also auto-indented XML and HTML, but I'm not sure whether it was the same plugin or a different plugin.

For example, I would type this:

<div id="foo" class="bar"><p>Hello, world!

I would then hit Ctrl+., and it would automatically change to this:

<div id="foo" class="bar"><p>Hello, world!</p>

I would hit Ctrl+. again, and it would change to this:

<div id="foo" class="bar"><p>Hello, world!</p></div>

2 Answers 2

1

I think you are looking for the The TextFX plugin - it will autoclose HTML/XML tags as you type.

Go to TextFX > TextFX Settings and check "auto close HTML/XML tags".

Sign up to request clarification or add additional context in comments.

3 Comments

I don't see a TextFX menu, but maybe that's just because I'm using the portable version.
Yeah, that may be the case. I believe TextFX used to be bundled with the main program.
I'm in a similar situation to @wecsam - I've upgraded and now Ctrl+. doesn't work. TextFX and autocomplete is not the same: Ctrl+. completed on-demand, not automatically. If anyone has more information, please let us know!
0

You can use default NPP auto-completion. In NPP open Settings->Preferences->Auto-Completion and check "html/xml close tag" checkbox. Now all opening tags which have closing tag will be closed automaticly and you do not need to keep in mind if you close tag or not.

2 Comments

That's not on demand, though. I'm pretty sure that Notepad++ could do it upon the press of Ctrl+[period].
You can do it with Zen Coding plugin by clicking < Ctrl+' >. This plugin is available thru NPP Pluging Manager. For more information read here. Hope this helps.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.