Skip to content

Instantly share code, notes, and snippets.

@hellomoto177
Created October 21, 2016 09:22
Show Gist options
  • Save hellomoto177/d7d031ec0e2fbb24b92ae44c686ea83a to your computer and use it in GitHub Desktop.
Save hellomoto177/d7d031ec0e2fbb24b92ae44c686ea83a to your computer and use it in GitHub Desktop.
[
{ "keys": ["e", "u"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["c"], "command": "enter_insert_mode",
"context":
[
{"key": "setting.command_mode"},
{"key": "selection_empty"}
]
},
{ "keys": ["C"], "command": "enter_insert_mode", "args":
{"insert_command": "vi_move_to_first_non_white_space_character"},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["C"], "command": "enter_insert_mode",
"args": {"insert_command": "shrink_selections_to_beginning"},
"context": [
{"key": "setting.command_mode"},
{"key": "selection_empty", "operator": "equal", "operand": false}
]
},
{ "keys": ["r"], "command": "enter_insert_mode", "args":
{"insert_command": "run_macro_file", "insert_args": {"file": "Packages/Default/Add Line.sublime-macro"} },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["R"], "command": "enter_insert_mode", "args":
{"insert_command": "run_macro_file", "insert_args": {"file": "Packages/Default/Add Line Before.sublime-macro"} },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["k"], "command": "enter_visual_mode",
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["k"], "command": "set_motion_mode", "args": {"mode": "normal"},
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_has_action" }
]
},
{ "keys": ["k"], "command": "exit_visual_mode", "args": {"toggle": true},
"context":
[
{"key": "setting.command_mode"},
{"key": "selection_empty", "operator": "equal", "operand": false, "match_all": false}
]
},
{ "keys": ["K"], "command": "enter_visual_line_mode",
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["K"], "command": "enter_visual_line_mode",
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_motion_mode", "operand": "line"}
]
},
{ "keys": ["K"], "command": "set_motion_mode", "args": {"mode": "line"},
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_has_action" }
]
},
{ "keys": ["L"], "command": "vi_paste_left",
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["l"], "command": "vi_paste_right",
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["v"], "command": "repeat", "context": [{"key": "setting.command_mode"}] },
{ "keys": ["Q"], "command": "set_action_motion", "args": {
"action": "vi_left_delete",
"motion": null },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["q"], "command": "set_action_motion", "args": {
"action": "vi_right_delete",
"motion": null },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["e"], "command": "set_action", "args": {
"action": "vi_delete",
"description": "Delete"},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["f"], "command": "set_action", "args": {
"action": "vi_copy",
"description": "Yank"},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["j"], "command": "set_action", "args": {
"action": "enter_insert_mode",
"description": "Change",
"action_args": {"insert_command": "vi_delete"}},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["V"], "command": "set_action", "args": {"action": "vi_indent", "description": "Indent"},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["W"], "command": "set_action", "args": {"action": "vi_unindent", "description": "Unindent"},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["<"], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "stops", "word_begin": true, "empty_line": true, "separators": "", "forward": true, "extend": true },
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": [","], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "stops", "word_begin": true, "punct_begin": true, "empty_line": true, "forward": true, "extend": true },
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["x"], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "stops", "word_begin": true, "punct_begin": true, "empty_line": true, "forward": false, "extend": true },
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["X"], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "stops", "word_begin": true, "empty_line": true, "separators": "", "forward": false, "extend": true },
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["."], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "stops", "word_end": true, "punct_end": true, "empty_line": true, "forward": true, "extend": true },
"inclusive": true,
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": [">"], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "stops", "word_end": true, "empty_line": true, "separators": "", "forward": true, "extend": true },
"inclusive": true,
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": [","], "command": "set_motion", "args": {
"motion": "vi_extend_to_end_of_whitespace_or_word",
"motion_args": {"repeat": 1},
"inclusive": true,
"clip_to_line": true },
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_action", "operand": "enter_insert_mode"}
]
},
{ "keys": ["<"], "command": "set_motion", "args": {
"motion": "vi_extend_to_end_of_whitespace_or_word",
"motion_args": {"repeat": 1, "separators": ""},
"inclusive": true,
"clip_to_line": true },
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_action", "operand": "enter_insert_mode"}
]
},
{ "keys": ["n"], "command": "set_motion", "args": {
"motion": "vi_move_by_characters_in_line",
"motion_args": {"forward": true, "extend": true, "visual": false }},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["d"], "command": "set_motion", "args": {
"motion": "vi_move_by_characters_in_line",
"motion_args": {"forward": false, "extend": true }},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["h"], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "lines", "forward": true, "extend": true },
"linewise": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["t"], "command": "set_motion", "args": {
"motion": "move",
"motion_args": {"by": "lines", "forward": false, "extend": true },
"linewise": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["I"], "command": "set_motion", "args": {
"motion": "vi_goto_line",
"motion_args": {"repeat": 1, "explicit_repeat": true, "extend": true,
"ending": "eof" },
"linewise": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["i", "i"], "command": "set_motion", "args": {
"motion": "vi_goto_line",
"motion_args": {"repeat": 1, "explicit_repeat": true, "extend": true,
"ending": "bof" },
"linewise": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["u", "<character>"], "command": "set_motion", "args": {
"motion": "vi_move_to_character",
"motion_args": {"extend": true },
"inclusive": true,
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["U", "<character>"], "command": "set_motion", "args": {
"motion": "vi_move_to_character",
"motion_args": {"extend": true, "forward": false },
"inclusive": true,
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["y", "<character>"], "command": "set_motion", "args": {
"motion": "vi_move_to_character",
"motion_args": {"extend": true, "before": true },
"inclusive": true,
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["Y", "<character>"], "command": "set_motion", "args": {
"motion": "vi_move_to_character",
"motion_args": {"extend": true, "forward": false, "before": true },
"inclusive": true,
"clip_to_line": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["j"], "command": "set_motion", "args": {
"motion": "vi_span_count_lines",
"linewise": true,
"motion_args": {"repeat": 1}},
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_action", "operand": "enter_insert_mode"}
]
},
{ "keys": ["e"], "command": "set_motion", "args": {
"motion": "expand_selection",
"motion_args": {"to": "line" },
"mode": "normal"},
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_action", "operand": "vi_delete"}
]
},
{ "keys": ["f"], "command": "set_motion", "args": {
"motion": "expand_selection",
"motion_args": {"to": "line" },
"mode": "normal"},
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_action", "operand": "vi_copy"}
]
},
{ "keys": ["V"], "command": "set_motion", "args": {
"motion": "expand_selection",
"motion_args": {"to": "line" },
"mode": "normal"},
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_action", "operand": "vi_indent"}
]
},
{ "keys": ["W"], "command": "set_motion", "args": {
"motion": "expand_selection",
"motion_args": {"to": "line" },
"mode": "normal"},
"context":
[
{"key": "setting.command_mode"},
{"key": "vi_action", "operand": "vi_unindent"}
]
},
{ "keys": ["E"], "command": "set_action_motion", "args": {
"action": "vi_delete",
"motion": "vi_move_to_hard_eol",
"motion_args": {"repeat": 1, "extend": true},
"motion_inclusive": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["J"], "command": "set_action_motion", "args": {
"action": "enter_insert_mode",
"action_args": {"insert_command": "vi_delete"},
"motion": "vi_move_to_hard_eol",
"motion_args": {"repeat": 1, "extend": true},
"motion_inclusive": true },
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["F"], "command": "set_action_motion", "args": {
"action": "vi_copy",
"motion": "expand_selection",
"motion_args": {"to": "line" }},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["o"], "command": "set_action_motion", "args": {
"action": "enter_insert_mode",
"action_args": {"insert_command": "vi_delete"},
"motion": "vi_move_by_characters_in_line",
"motion_args": {"forward": true, "extend": true, "visual": false }},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["O"], "command": "set_action_motion", "args": {
"action": "enter_insert_mode",
"action_args": {"insert_command": "vi_delete"},
"motion": "vi_span_count_lines",
"motion_linewise": true,
"motion_args": {"repeat": 1}},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["c", ","], "command": "set_motion", "args": {
"motion": "vi_expand_to_words",
"motion_args": {"repeat": 1}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", ","], "command": "set_motion", "args": {
"motion": "vi_expand_to_words",
"motion_args": {"repeat": 1, "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "<"], "command": "set_motion", "args": {
"motion": "vi_expand_to_big_words",
"motion_args": {"repeat": 1}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "<"], "command": "set_motion", "args": {
"motion": "vi_expand_to_big_words",
"motion_args": {"repeat": 1, "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "\""], "command": "set_motion", "args": {
"motion": "vi_expand_to_quotes",
"motion_args": {"character": "\""}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "\""], "command": "set_motion", "args": {
"motion": "vi_expand_to_quotes",
"motion_args": {"character": "\"", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "'"], "command": "set_motion", "args": {
"motion": "vi_expand_to_quotes",
"motion_args": {"character": "'"}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "'"], "command": "set_motion", "args": {
"motion": "vi_expand_to_quotes",
"motion_args": {"character": "'", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "y"], "command": "set_motion", "args": {
"motion": "vi_expand_to_tag"},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "y"], "command": "set_motion", "args": {
"motion": "vi_expand_to_tag",
"motion_args": {"outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "("], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "("}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "("], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "(", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", ")"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "("}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", ")"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "(", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "x"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "("}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "x"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "(", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "["], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "["}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "["], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "[", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "]"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "["}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "]"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "[", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "{"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "{"}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "{"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "{", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "}"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "{"}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "}"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "{", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["c", "X"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "{"}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "X"], "command": "set_motion", "args": {
"motion": "vi_expand_to_brackets",
"motion_args": {"character": "{", "outer": true}},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{ "keys": ["a", "l"], "command": "set_motion", "args": {
"motion": "expand_selection_to_paragraph"},
"context": [{"key": "setting.command_mode"}, {"key": "vi_can_enter_text_object"}]
},
{
"keys": ["b"], "command": "find_next",
"args": {"select_text": false},
"context": [{"key": "setting.command_mode"}]
},
{
"keys": ["B"],
"command": "find_prev",
"args": {"select_text": false},
"context": [{"key": "setting.command_mode"}]
},
{ "keys": ["v"], "command": "repeat", "context": [{"key": "setting.command_mode"}] }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment