Notepad++ auto-close HTML tags in PHP files
Solution 1
This is a bit annoying, but you could temporarily switch to HTML language, and when you're done, switch back to PHP language.
Solution 2
Install the TextFX plugin and go to menu TextFX → TextFX Settings → +Autoclose XHTML/XML <Tag>.
Solution 3
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.
Solution 4
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.
Headshota
Hey there! My name is Shota Bakuradze, I'm a software developer. Currently into Ruby and Rust. I love coding, learning about programming fundamentals and best practices. In spare time I enjoy playing my guitar, train mixed martial arts and sometimes even do some photography.
Updated on June 14, 2022Comments
-
Headshota almost 2 years
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?
-
Headshota about 13 yearsI don't think CCompletion has HTML tag auto-closing, but thanks =)
-
davidosomething about 13 yearspretty sure this is the answer, but you have to switch to HTML in the language menu instead of PHP :D
-
Peter Mortensen almost 6 yearsDo you mean for "Matched pair 1" and "Matched pair 2"? A screenshot (with filled-in values) would be helpful. Thanks in advance.