Last active
April 1, 2017 22:03
-
-
Save samueleaton/ecb1ca564b103b651c12982cff50306c to your computer and use it in GitHub Desktop.
Adds extra space between brackets when using space key in sublime text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": [" "], "command": "insert_snippet", "args": {"contents": " $0 "}, "context": [ | |
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(\\(|\\[|{) ?$", "match_all": true }, | |
{ "key": "following_text", "operator": "regex_contains", "operand": "^(\\)|\\]|})", "match_all": true } | |
]}, | |
{ "keys": [" "], "command": "insert_snippet", "args": {"contents": "$0 "}, "context": [ | |
{ "key": "preceding_text", "operator": "regex_contains", "operand": "(\\(|\\[|{) $", "match_all": true }, | |
{ "key": "following_text", "operator": "regex_contains", "operand": "^(\\)|\\]|})", "match_all": true } | |
]} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hitting the space bar when the cursor is between
{}
will produce{ }
with your cursor in the exact middle.