Skip to content

Instantly share code, notes, and snippets.

@unphased
Last active December 15, 2015 15:39
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 unphased/5283241 to your computer and use it in GitHub Desktop.
Save unphased/5283241 to your computer and use it in GitHub Desktop.
My Windows ST2 User keymap
[
// map ctrl+l to go to line
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
// and ctrl+g does what F3 does
{ "keys": ["ctrl+g"], "command": "find_next" },
{ "keys": ["ctrl+shift+g"], "command": "find_prev" },
// overrides F-key functionality (only really used on Windows as OSX overloads f-keys with useful functionality)
{ "keys": ["f1"], "command": "new_file"},
{ "keys": ["f2"], "command": "next_view_in_stack"},
{ "keys": ["f3"], "command": "prev_view_in_stack"},
// This is for finding a file there (when disabling the plugin that auto-does this on buffer focus)
{ "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"},
// these are for instrumenting shift+backspace (which is easy to press while messing about with brackets and strings)
// with the same behavior w.r.t. smart handling of the wrapping characters.
{ "keys": ["shift+backspace"], "command": "run_macro_file", "args": {"file": "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 }
]
},
{ "keys": ["shift+backspace"], "command": "run_macro_file", "args": {"file": "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 }
]
},
{ "keys": ["shift+backspace"], "command": "run_macro_file", "args": {"file": "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 }
]
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment