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 开发者_如何学JAVAthink 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?
Install the TextFX plugin and go to menu TextFX → TextFX Settings → +Autoclose XHTML/XML <Tag>.
This is a bit annoying, but you could temporarily switch to HTML language, and when you're done, switch back to PHP language.
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.
I have found a solution which could ease up the issue.
In menu Settings → Preferences
in the Auto-Completion tab, try to add <
>
and ?
?
in the blanks.
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.
It's not complete, but it's convincing. You can install TextFX and go to menu TextFX → TextFX Settings → +Autoclose Brace (not HTML/XHTML).
I got it. It works.
精彩评论