Skip to content

Instantly share code, notes, and snippets.

@const-g
Last active April 23, 2016 15:25
Show Gist options
  • Save const-g/3caea9a0c18593c302a75c9fbfee3b27 to your computer and use it in GitHub Desktop.
Save const-g/3caea9a0c18593c302a75c9fbfee3b27 to your computer and use it in GitHub Desktop.
{ "keys": ["("], "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": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|;|\\}|$)", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.php" }
]
},
{ "keys": ["("], "command": "insert_snippet", "args": {"contents": " ( ${0:$SELECTION} )"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.php" }
]
},
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Left Right.sublime-macro"}, "context":
[
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\( $", "match_all": true },
{ "key": "following_text", "operator": "regex_contains", "operand": "^ \\)", "match_all": true },
{ "key": "selector", "operator": "equal", "operand": "source.php" }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment