How can I define my own custom surround template that I can use to wrap around a selection of javascript code followed by reformat.
I've used Alt + Cmd + T
to bring up this option panel.
How can I define my own custom surround template that I can use to wrap around a selection of javascript code followed by reformat.
I've used Alt + Cmd + T
to bring up this option panel.
Go to Settings/Live Templates, create a new Live template, specify abbreviation, description and contexts, check Reformat according to code style.
And now the important part. The Live template content must contain
$SELECTION$
variable for it to be applicable for Surround with action. For instance:After you save the template you should see it in the pop-up list next time you use the Surround With action.