Last active
December 14, 2015 22:59
-
-
Save ktraff/5162550 to your computer and use it in GitHub Desktop.
My Sublime Text 2 keymap. Simple but powerful.
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
[ | |
// auto-indentation shortcut | |
{ "keys": ["f9"], "command": "reindent"}, | |
// tab escape parenthesis, quotes, etc... | |
{ "keys": ["tab"], "command": "move", "args": {"by": "characters", "forward": true}, "context": | |
[ | |
{ "key": "preceding_text", "operator": "regex_contains", "operand": "[^ \t]+", "match_all": true }, | |
{ "key": "following_text", "operator": "regex_contains", "operand": "^[)'}\"\\]]", "match_all": true }, | |
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }, | |
// prevent tab escape when cycling through snippet fields | |
{ "key": "has_next_field", "operator": "equal", "operand": false } | |
] | |
}, | |
// linux system keybindings overrides ctrl+space for autocompletion. Adding this manually | |
{ "keys": ["ctrl+space"], "command": "auto_complete" }, | |
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, | |
{ "key": "auto_complete_visible", "operator": "equal", "operand": false }, | |
{ "key": "setting.tab_completion", "operator": "equal", "operand": true } | |
] | |
}, | |
// override f2 for bookmarks, as I'm using this to switch linux workspace | |
{ "keys": ["f5"], "command": "next_bookmark" }, | |
// Vintage (vim) escape insert mode | |
{ "keys": ["j", "j"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment