r/PHPhelp • u/satailx • Jun 12 '25
Solved PHP Code Editor
(PHP code editor that grays out HTML when working with PHP and vice versa)
Greetings! (And sorry if the question is misplaced)
Couple of years ago I saw a code editor that grayed out all HTML blocks when working with PHP code blocks and grayed out PHP code blocks when working with HTML. Switching happened automatically: when text cursor was put in the PHP code all HTML code was grayed out, focusing on PHP, and when cursor was put in HTML code, all PHP code was grayed out, focusing on HTML.
Unfortunately, I forgot what that editor was and cannot find it now. Can anyone advise its name?
------------------
UPD: PHPDesigner has this feature (thanks to u/LordAmras). However, if you know any other editor with this feature, please, feel free to add.
2
u/phpMartian Jun 12 '25
I have never seen such an editor. It sounds like can help if you are working with legacy code from the past. Of course today, we create little or no code that mixes the two so editors are not likely to support features like this. I wonder if it would be possible to make a vs code extension that did this?
2
u/colshrapnel Jun 13 '25
It's not that it is misplaced but rather mistitiled. People looking for a PHP Code Editor landing here will be disappointed because this question is about one particular feature. People looking for this feature won't likely find it because of a generic title. PHP Code Editor that grays out HTML when working on PHP block and vice versa would have been better. And even could have caught an eye of the actual user of such editor who otherwise might just skipped too generic title knowing beforehand that it will be yet another PHPStorm circlejerk post.
2
u/colshrapnel Jun 12 '25
Separate your PHP files from HTML (at least include HTML templates into PHP controllers) and you won't need this feature anymore.
1
u/somdcomputerguy Jun 13 '25
Notepad ++ might do some or enough or all you want.
1
u/Own-Rooster1955 Jun 14 '25 edited Jun 19 '25
This feature exists in PhpED from nusphere.com
1
u/podlom Jun 14 '25
Have you tried this one: https://www.geany.org/download/ Download | Geany
What do you think?
1
u/equilni Jun 13 '25 edited Jun 13 '25
Never heard of such a feature. Was it just limited to PHP & HTML? This could be expanded to other languages, which makes this more of a r/programming or r/webdev question than PHP...
That said, quickly browsing VS Code marketplace, I only find dimming blocks or syntax highlighting for string literals - even while quickly looking up for JS/CSS/SQL too.
Edit - why the downvoting?
0
u/boborider Jun 13 '25
Netbeans
CNTRL + SHIFT + F Automatically formats your code, proper indentions and arrangement to any language.
0
u/[deleted] Jun 13 '25
[deleted] — view deleted comment
0
u/[deleted] Jun 13 '25
[deleted] — view deleted comment