Is there some configuration or plugin I can use which would add spaces to the inside of parentheses when they're matched. Here's an example of what I'm trying to explain.
if (^) // ^ represents cursor position
if ( ^ ) // Where I want the cursor to be positioned.
Best Answer
You can edit the auto-pair functionality. I copied the following from "Key Bindings - Default" into "Key Bindings - User". Add spaces in the
contents
values. You can do something similar for square and curly brackets. The first setting sets it for normal use. The second sets it for when you have text highlighted.Edit To make the key binding syntax specific, add a line at the bottom of the
context
values. You will have to find the syntax'sscopeName
. For example html istext.html
and sass issource.sass
.