Created
June 26, 2013 17:56
-
-
Save jacob-ogre/5869708 to your computer and use it in GitHub Desktop.
Sublime Text: Custom keybindings, mostly Vintage (Vim)
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
[ | |
// Working in some additional Vim or Vim-like bindings; using 'g' as <leader> | |
// because it's homerow and unused for most commands: | |
{ "keys": ["g", "t"], "command": "next_view", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "r"], "command": "prev_view", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "n"], "command": "focus_side_bar", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "w"], "command": "focus_group", "args": { "group": 0 } }, | |
{ "keys": ["g", "m"], "command": "find_under_expand", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "s"], "command": "sftp_browse_server", "context": [{"key": "setting.command_mode"}] }, | |
// Play some macros; still using 'g' as <leader>: | |
{ "keys": ["g", "a"], "command": "run_macro_file", "args": {"file": "Packages/User/space_above.sublime-macro"}, "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["g", "b"], "command": "run_macro_file", "args": {"file": "Packages/User/space_below.sublime-macro"}, "context": [{"key": "setting.command_mode"}] }, | |
// add fold-all like Vim <some extra> | |
{ "keys": ["z", "M"], "command": "fold_by_level", "args": {"level": 1}, "context": [{"key": "setting.command_mode"}] }, | |
// Treat the sidebar like NERDTree: | |
{ "keys": ["n", "t"], "command": "nerd_tree", "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["t", "n"], "command": "nerd_tree_close"}, | |
// column/block select | |
{ "keys": ["ctrl+j"], "command": "select_lines", "args": {"forward": true}, "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["ctrl+k"], "command": "select_lines", "args": {"forward": false}, "context": [{"key": "setting.command_mode"}] }, | |
{ "keys": ["v", "p"], "command": "expand_selection_to_paragraph", "context": [{"key": "setting.command_mode"}] }, | |
// change command palette access to something more convenient: | |
{ "keys": [";"], "command": "show_overlay", "args": {"overlay": "command_palette"}, "context": [{"key": "setting.command_mode"}] }, | |
// And some non-Vimmy customizations: | |
{ "keys": ["super+shift+o"], "command": "prompt_open_folder"} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
26 June 2013 key bindings for Sublime Text 2, most of which are Vintage mode (Vim-like). Many treat 'g' as because it keeps my hands squarely on the home row. Today added macros for inserting an empty line above or below current line without leaving Command (= normal) mode; changed sftp_browse to 'gs'.