Skip to content

Instantly share code, notes, and snippets.

@villadora
Created April 23, 2013 08:40
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 villadora/5441847 to your computer and use it in GitHub Desktop.
Save villadora/5441847 to your computer and use it in GitHub Desktop.
for subliemacspro
[
{ "keys": ["alt+q"], "command": "wrap_lines" },
{ "keys": ["ctrl+o"], "command": "sbp_open_line" },
// Emacs style go to indentation, alt+e can be complicated on Macs
{ "keys": ["alt+a"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["alt+e"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["alt+e"], "command": "move_to", "args": {"to": "eol", "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
// Emacs Move to hard beol eol for ctrl shortcuts
{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "hardbol", "extend": false}},
{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "hardbol", "extend": false}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "hardeol", "extend": false}},
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "hardeol", "extend": false}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["home"], "command": "move_to", "args": {"to": "bof", "extend": true} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eof", "extend": true} },
{ "keys": ["alt+v"], "command": "move", "args": {"by": "pages", "forward": false} },
{ "keys": ["ctrl+v"], "command": "move", "args": {"by": "pages", "forward": true} },
{ "keys": ["ctrl+alt+["], "command": "sbp_move_to_paragraph", "args": {"forward": false} },
{ "keys": ["ctrl+alt+]"], "command": "sbp_move_to_paragraph", "args": {"forward": true} },
{ "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["alt+b"], "command": "move", "args": {"by": "words", "forward": false}},
{ "keys": ["alt+f"], "command": "move", "args": {"by": "word_ends", "forward": true}},
{ "keys": ["ctrl+h"], "command": "left_delete"},
{ "keys": ["ctrl+shift+h"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete to Hard BOL.sublime-macro"}},
{ "keys": ["ctrl+d"], "command": "right_delete"},
{ "keys": ["alt+d"], "command": "delete_word", "args": { "forward": true } },
{ "keys": ["ctrl+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["alt+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["super+backspace"], "command": "delete_word", "args": { "forward": false } },
{ "keys": ["ctrl+/"], "command": "undo"},
{ "keys": ["ctrl+x", "u"], "command": "undo" },
{ "keys": ["ctrl+shift+/"], "command": "redo"},
{ "keys": ["ctrl+shift+-"], "command": "undo"}, // consistency with the Mac
{ "keys": ["alt+z"], "command": "sbp_zap_to_char"},
{ "keys": ["alt+shift+,"], "command": "move_to", "args": {"to": "bof", "extend": false}},
{ "keys": ["alt+shift+."], "command": "move_to", "args": {"to": "eof", "extend": false}},
{ "keys": ["ctrl+l"], "command": "sbp_recenter_in_view" },
{ "keys": ["alt+q"], "command": "sbp_wrap_paragraph"},
{ "keys": ["ctrl+x","h"], "command": "select_all"},
// Kill Ring handling
{ "keys": ["ctrl+k"], "command": "sbp_kill_line"},
{ "keys": ["alt+k"], "command": "sbp_kill_to_end_of_sentence"},
{ "keys": ["ctrl+y"], "command": "paste" },
{ "keys": ["ctrl+shift+y"], "command": "sbp_yank_choice" },
{ "keys": ["alt+y"], "command": "sbp_yank_choice" },
{ "keys": ["ctrl+space"], "command": "sbp_set_mark" },
{ "keys": ["ctrl+w"], "command": "sbp_delete_to_mark", "context": [
{ "key": "panel_visible", "operator": "equal", "operand": false }
]
},
{ "keys": ["super+c"], "command": "sbp_kill_ring_save" },
{ "keys": ["alt+w"], "command": "sbp_kill_ring_save" },
{ "keys": ["ctrl+g"], "command": "sbp_cancel_mark" },
{ "keys": ["ctrl+f"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["right"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+b"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["left"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+b"], "command": "move", "args": {"by": "words", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+f"], "command": "move", "args": {"by": "word_ends", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+n"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+p"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["down"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["up"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true}, "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
// Search and Replace
{ "keys": ["ctrl+s"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":false}, "context": [
{ "key": "sbp_search_focus_check", "operator": "equal", "operand": true }
] },
{ "keys": ["ctrl+r"], "command": "show_panel", "args": {"panel": "incremental_find", "reverse":true} },
{ "keys": ["ctrl+s"], "command": "find_next", "context": [
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+r"], "command": "find_prev", "context": [
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+r"], "command": "show_panel", "args": {"panel": "replace"} },
{ "keys": ["super+r"], "command": "show_panel", "args": {"panel": "replace"} },
// Goto stuff
{ "keys": ["ctrl+x", "ctrl+f"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
{ "keys": ["alt+g", "alt+g"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true, "text" : ":"}},
{ "keys": ["ctrl+alt+g"], "command": "show_overlay", "args": {"overlay":"goto", "show_files" : false, "text": "@"}},
{ "keys": ["ctrl+x", "b"], "command": "next_view" },
{ "keys": ["ctrl+x", "ctrl+b"], "command": "goto_open_file"},
{ "keys": ["ctrl+x", "o"], "command": "sbp_cycle_focus_group"},
{ "keys": ["ctrl+x", "5", "2"], "command": "new_window" },
{
"keys": ["ctrl+x", "2"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 0.5, 1.0],
"cells": [[0, 0, 1, 1], [0, 1, 1, 2]]
}
},
{
"keys": ["ctrl+x", "1"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
}
},
{
"keys": ["ctrl+x", "3"],
"command": "set_layout",
"args":
{
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1], [1, 0, 2, 1]]
}
},
// Search word under cursor in current file
{ "keys": ["ctrl+x", "ctrl+d"], "command": "find_under_expand_skip" },
// Indentation
{ "keys": ["ctrl+c", ">"], "command": "indent" },
{ "keys": ["ctrl+c", "<"], "command": "unindent" },
// Show command execute console
{ "keys": ["alt+x"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
// Completion
{ "keys": ["alt+/"], "command": "auto_complete" },
{ "keys": ["alt+/"], "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 }
]
},
// Aborter
// Abort multiple selections
{ "keys": ["ctrl+g"], "command": "single_selection", "context":
[
{ "key": "num_selections", "operator": "not_equal", "operand": 1 }
]
},
// Exit Snippet mode
{ "keys": ["ctrl+g"], "command": "clear_fields", "context":
[
{ "key": "has_next_field", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+g"], "command": "clear_fields", "context":
[
{ "key": "has_prev_field", "operator": "equal", "operand": true }
]
},
// Hide Overlays and such
{ "keys": ["ctrl+g"], "command": "hide_overlay", "context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+g"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+g"], "command": "hide_panel", "context":
[
{ "key": "panel_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+g"], "command": "sbp_cancel_mark", "context":
[
{ "key": "sbp_emacs_has_mark", "operator": "equal", "operand": true }
]
},
{ "keys": ["alt+;"], "command": "sbp_toggle_comment" },
// Rectangles
{ "keys": ["ctrl+x", "r", "t"], "command": "sbp_rectangle_insert" },
{ "keys": ["ctrl+x", "r", "d"], "command": "sbp_rectangle_delete" },
// Registers
{ "keys": ["ctrl+x", "r", "s"], "command": "sbp_register_store" },
{ "keys": ["ctrl+x", "r", "i"], "command": "sbp_register_insert" },
{ "keys": ["ctrl+x", "r", " "], "command": "sbp_point_to_register" },
{ "keys": ["ctrl+x", "r", "j"], "command": "sbp_point_from_register" },
// Do it my way
{ "keys": ["ctrl+x", "k"], "command": "close" },
{ "keys": ["ctrl+x", "ctrl+c"], "command": "exit"},
{ "keys": ["ctrl+x", "ctrl+s"], "command": "save"},
// Other Emacs features
// { "keys": ["alt+x", "f", "f", "a", "p"], "command": "sbp_find_file_at_point" },
// Emacs style tabs
{ "keys": ["tab"], "command": "reindent", "context": [
{ "key": "panel_has_focus", "operand": false },
{ "key": "auto_complete_visible", "operand": false },
{ "key": "has_next_field", "operand": false },
{ "key": "overlay_visible", "operand": false }]
},
// Macro recording
{ "keys": ["ctrl+x", "("], "command": "toggle_record_macro" },
{ "keys": ["ctrl+x", ")"], "command": "toggle_record_macro" },
{ "keys": ["ctrl+x", "e"], "command": "run_macro" },
{ "keys": ["home"], "command": "move_to", "args": {"to": "bof"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eof"} },
// Go to the beginning/end of file
{ "keys": ["ctrl+x", "["], "command": "move_to", "args": {"to": "bof"} },
{ "keys": ["ctrl+x", "]"], "command": "move_to", "args": {"to": "eof"} },
// move regions up/down
{ "keys": ["alt+p"], "command": "swap_line_up" },
{ "keys": ["alt+n"], "command": "swap_line_down" },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eof", "extend": true} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true } }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment