Headshota
Headshota

Reputation: 21449

Notepad++ auto-close HTML tags in PHP files

In Notepad++, how can I enable to auto-close HTML tags in PHP files?

I'm able to do this in HTML and XML files (I think the TextFX plugin does it), but in PHP files it doesn't work. Is there a plugin (or built-in functionality) to enable auto-close HTML tags in PHP files?

Upvotes: 16

Views: 16108

Answers (6)

Amirmahmood Vahabi
Amirmahmood Vahabi

Reputation: 21

I have found a solution which could ease up the issue.

In menu SettingsPreferences in the Auto-Completion tab, try to add < > and ? ? in the blanks.

Upvotes: 2

Trinh Van Cuong
Trinh Van Cuong

Reputation: 1

It's not complete, but it's convincing. You can install TextFX and go to menu TextFXTextFX Settings → +Autoclose Brace (not HTML/XHTML).

I got it. It works.

Upvotes: 0

msmafra
msmafra

Reputation: 1714

Install the TextFX plugin and go to menu TextFXTextFX Settings → +Autoclose XHTML/XML <Tag>.

Upvotes: 9

Dan Blows
Dan Blows

Reputation: 21194

Try XML Tools.

Unfortunately I'm on a Mac, so I can't test, but I'm pretty sure this is the plugin I used before, and it worked fine.

Upvotes: 0

David
David

Reputation: 1101

Try CCompletion. It's an auto-completion plugin for Notepad++, and it might suit your needs: here.

Also, the next Notepad++ 5.0 will feature auto-completion. You can grab a beta version somewhere over the web - look over here.

Upvotes: 3

Kevin Ji
Kevin Ji

Reputation: 10499

This is a bit annoying, but you could temporarily switch to HTML language, and when you're done, switch back to PHP language.

Upvotes: 8

Related Questions