In PhpStorm, if you're editing HTML, you can highlight some code, press Ctrl + Alt + J (default shortcut), and you'll get the option to wrap the highlighted code in an HTML tag of your choice. Useful for quickly wrapping something in a div
, or if you forgot to make a tr
before you made your td
s.
I was wondering if there's an existing similar feature for PHP code?
For instance, if I have a line of code, I want to highlight it, and wrap it in a generic for
-loop.
I was sure I'd seen this before, but it might have been Eclipse or NetBeans.