Last active
October 2, 2015 18:38
-
-
Save magnusdahlstrand/2296552 to your computer and use it in GitHub Desktop.
User Sublime Text keymap
This file contains hidden or 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
Show hidden characters
/* | |
User settings (shouldn't be overwritten on update) | |
*/ | |
[ | |
//Scroll down 10 rows | |
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 10.0} }, | |
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -10.0} }, | |
//Switch view by tab order | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["ctrl+tab"], "command": "next_view" }, | |
//Switch view by last used | |
{ "keys": ["ctrl+alt+tab"], "command": "next_view_in_stack" }, | |
{ "keys": ["ctrl+shift+alt+tab"], "command": "prev_view_in_stack" }, | |
//Move line | |
{ "keys": ["alt+up"], "command": "swap_line_up" }, | |
{ "keys": ["alt+down"], "command": "swap_line_down" }, | |
//Duplicate line/Delete line | |
{ "keys": ["super+d"], "command": "duplicate_line" }, | |
{ "keys": ["super+shift+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }, | |
//Move by words/subwords | |
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "words", "forward": false} }, | |
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "word_ends", "forward": true} }, | |
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} }, | |
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} }, | |
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, | |
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} }, | |
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} }, | |
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} }, | |
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} }, | |
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} }, | |
//Clear selection on esc | |
{ "keys": ["escape"], "command": "move", "args": {"by": "characters", "forward": false}, | |
"context": | |
[ | |
{ "key": "selection_empty", "operator": "equal", "operand": false}, | |
{ "key": "num_selections", "operator": "equal", "operand": 1 }, | |
{ "key": "setting.is_widget", "operator": "equal", "operand": false } | |
] | |
}, | |
//Goto line | |
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
//Go to previous/next edit position (requires plugin) | |
{ "keys": ["ctrl+["], "command": "previous_edit" }, | |
{ "keys": ["ctrl+]"], "command": "next_edit" }, | |
//Swap case | |
{ "keys": ["super+k", "super+t"], "command": "title_case" }, | |
{ "keys": ["super+k", "super+s"], "command": "swap_case" }, | |
// Encodes | |
{ "keys": ["super+k", "super+e", "super+e"], "command": "html_entitize" }, | |
{ "keys": ["super+k", "super+e", "super+u"], "command": "url_encode" }, | |
// Decodes | |
{ "keys": ["super+k", "super+d", "super+e"], "command": "html_deentitize" }, | |
{ "keys": ["super+k", "super+d", "super+u"], "command": "url_decode" }, | |
{ "keys": ["ctrl+f2"], "command": "prev_bookmark" }, | |
//Select all bookmarks | |
{ "keys": ["super+alt+f2"], "command": "select_all_bookmarks" }, | |
//Add console.log and remap the original feature under the same binding | |
{ "keys": ["super+shift+l"], | |
"command": "insert_snippet", | |
"args": { | |
"contents": "console.log(${1:$SELECTION}${0});" | |
} | |
}, | |
{ "keys": ["super+shift+ctrl+l"], "command": "split_selection_into_lines" }, | |
//Select last tab instead of tab 9 when pressing super+9 | |
{ "keys": ["super+1"], "command": "select_by_index", "args": { "index": 0 } }, | |
{ "keys": ["ctrl+alt+d"], "command": "find_under_expand" }, | |
{ "keys": ["ctrl+alt+k", "ctrl+alt+d"], "command": "find_under_expand_skip" }, | |
{ "keys": ["super+o"], "command": "fuzzy_start_from_file" }, | |
{ "keys": ["super+shift+o"], "command": "fuzzy_bookmarks_load" }, | |
{ "keys": ["super+alt+c"], "command": "inline_calculator" } | |
] |
This file contains hidden or 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": ["ctrl+tab"], "command": "next_view" }, | |
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }, | |
{ "keys": ["ctrl+d"], "command": "duplicate_line" }, | |
{ "keys": ["ctrl+shift+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} }, | |
{ "keys": ["ctrl+up"], "command": "scroll_lines", "args": {"amount": 10.0 } }, | |
{ "keys": ["ctrl+down"], "command": "scroll_lines", "args": {"amount": -10.0 } }, | |
{ "keys": ["alt+up"], "command": "swap_line_up" }, | |
{ "keys": ["alt+down"], "command": "swap_line_down" }, | |
{ "keys": ["alt+left"], "command": "move", "args": {"by": "words", "forward": false} }, | |
{ "keys": ["alt+right"], "command": "move", "args": {"by": "word_ends", "forward": true} }, | |
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "words", "forward": false, "extend": true} }, | |
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true} }, | |
{ "keys": ["ctrl+left"], "command": "move", "args": {"by": "subwords", "forward": false} }, | |
{ "keys": ["ctrl+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} }, | |
{ "keys": ["ctrl+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} }, | |
{ "keys": ["ctrl+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} }, | |
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
//Find/replace | |
{ "keys": ["ctrl+alt+f"], "command": "show_panel", "args": {"panel": "replace"} }, | |
{ "keys": ["ctrl+alt+r"], "command": "toggle_regex", "context": | |
[{ "key": "setting.is_widget", "operator": "equal", "operand": true }] | |
}, | |
{ "keys": ["ctrl+alt+w"], "command": "toggle_whole_word", "context": | |
[{ "key": "setting.is_widget", "operator": "equal", "operand": true }] | |
}, | |
{ "keys": ["ctrl+alt+a"], "command": "toggle_preserve_case", "context": | |
[{ "key": "setting.is_widget", "operator": "equal", "operand": true }] | |
}, | |
//Clear selection on esc | |
{ "keys": ["escape"], "command": "move", "args": {"by": "characters", "forward": false}, | |
"context": | |
[ | |
{ "key": "selection_empty", "operator": "equal", "operand": false}, | |
{ "key": "num_selections", "operator": "equal", "operand": 1 }, | |
{ "key": "setting.is_widget", "operator": "equal", "operand": false } | |
] | |
}, | |
//Git comand | |
{ "keys": ["ctrl+shift+g"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": "Git: "} }, | |
//Calculate | |
{ "keys": ["ctrl+shift+0"], "command": "calculate", "args": {"replace": false} }, | |
{ "keys": ["ctrl+shift+alt+1"], "command": "calculate_count" }, | |
{ "keys": ["ctrl+alt+c"], "command": "calculate", "args": {"replace": true} } | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment