When I comment out a line of strictly PHP code using my keybind (ctrl+/), the entire line is commented out and becomes grey in color, as desired. The same is true for a line of strictly HTML code. But if execute the same keybind on a line that is a mix of HTML and PHP code, e.g.
<img width="<alt="<?php echo esc_attr( $spacious_slider_title ); ?>">
the entire line does not become grey in color. Only the HTML portions of the line become grey (screenshot example). Plus, in that case, I believe the PHP code will still execute. Is there a way to completely comment out a line of mixed syntax code like this, ensure the PHP code does not execute, and have the line completely greyed out in VS Code, with a single keystroke? If so, how would I approach that?
My current course of action in these cases is to carry out the comment keybind, which wraps the line in HTML comments. After, I will manually add a // before the PHP code to also comment it out. I'm hoping there is a single keybind solution to this, as this sometimes becomes tedious.
I should perhaps note that I just installed VS Code and am learning it. I am coming from SublimeText, so the first thing I did was install SublimeText keybinds. This was an issue with SublimText as well, and I don't believe there was a solution.
I've seen this previous question (How to comment out both HTML and PHP in PHP inside HTML?). While it is related, it doesn't exactly answer my particular question about a VS Code keybind.
<!--<img width="<alt="--><?php //echo esc_attr( $spacious_slider_title ); ?><!--">-->Would you consider switching? ;)