Hi, I’d like to know how to transform :
echo('Sublimtext');
To :
echo ( 'Sublimtext' );
But, adding the space for brackets on ly when I type :
echo([space]
So, If I type
echo(
Sublimetext will add the close ) and it’s good, but then, if I add a space between, then, Sublimtext add two spaces, placing the cursor in the middle :
echo ( | )
(the pipe is the cursor) and if it could add a space before the parenthese it would be great, too.
I tried this, but it’s not working :
{ "keys": "space"], "command": "insert_snippet", "args": {"contents": " $0 )"}, "context":
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "equal", "operand": "(", "match_all": true }
]
}
But I want to do it only if there is a space after the (
Thank you for your attention.