[answered] Multilines "bracket intention"
Let's say in my JS file I have two lines:
doSomething();
doSomethingElse();
I want to protect that with a test:
if (itIsSafe)
doSomething();
doSomethingElse();
What is the best way to enclose the two lines in brackets? I can use alt-enter and use the intensions menus, but only on the first line. Is it something quicker?
TIA
greg
Please sign in to leave a comment.
Sorry I forgot to tag this as a question.
Hi there,
Create custom Live Template (use $SELECTION$ for selection placeholder).
Once all setup correctly -- your template will be available when you select some text and then invoke "Code | Surround With..." (Ctrl+Alt+T)
---
That's if you need some custom/specific template. Basic if() with brackets is already avaialble in that list for JavaScript.
ctrl+alt+t is exactly what I need :).
thanks a lot!
greg