How to insert a space at the beginning and end of parentheses in VSCode?

Viewed 259

I've tried a lot of extensions, including PHP Intelephense and Space Inside Braces. I can't get what I want.

From the following code:

function foo($a, $b) {
}
foo($a, $b);

I want this result:

function foo( $a, $b ) {
}
foo( $a, $b );
1 Answers

Simple. Just CTRL+H (or Edit->Replace) and replace '(' with '( ' and ')' with ' )'.

Related