Skip to content

Instantly share code, notes, and snippets.

@curtisbelt
Last active November 29, 2016 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curtisbelt/ba9795cd8a66a0cab968a6adadc9d2a8 to your computer and use it in GitHub Desktop.
Save curtisbelt/ba9795cd8a66a0cab968a6adadc9d2a8 to your computer and use it in GitHub Desktop.
Default (Windows).sublime-keymap
[
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" },
// Auto-space within parentheses
{ "keys": [" "], "command": "insert_snippet", "args": {"contents": " $0 "}, "context":
[
{ "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 }
]
},
// Auto-space within brackets
{ "keys": [" "], "command": "insert_snippet", "args": {"contents": " $0 "}, "context":
[
{ "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 }
]
},
// Auto-space within curly braces
{ "keys": [" "], "command": "insert_snippet", "args": {"contents": " $0 "}, "context":
[
{ "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 }
]
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment