How to enter Vintage Command mode in Sublime Text
2 answers
From the documentation -
Vintage starts in insert mode by default. This can be changed by adding:
"vintage_start_in_command_mode": true
to your User Settings.
and then -
if you'd like to bind "jj" to exit insert mode, you can add this key binding:
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
}
+10
source to share
I find it Preferences -> Key Bindings - User
convenient to use the following: it also exits Visual mode. Note the capital J and K, since in visual mode you want to use j and k to move.
{ "keys": ["J", "K"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false },
{ "key": "setting.vintage_ctrl_keys" }
]
},
{ "keys": ["J", "K"], "command": "exit_visual_mode",
"context":
[
{ "key": "setting.command_mode"},
{ "key": "num_selections", "operand": 1},
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": false },
{ "key": "setting.vintage_ctrl_keys" }
]
},
+1
source to share