Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enter Vintage Command mode in Sublime Text

Tags:

sublimetext2

I'm on OSX. I am pretty sure Vintage mode is enabled (I see INSERT MODE in the status bar), but I can't enter COMMAND mode. How do I do that? The escape key doesn't work, as I've seen in some tutorials. Thanks!

like image 856
Matt Fordham Avatar asked Sep 19 '25 00:09

Matt Fordham


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 }
    ]
}
like image 149
Bibhas Debnath Avatar answered Sep 23 '25 14:09

Bibhas Debnath


I find the following is handy in Preferences -> Key Bindings - User since it also exits Visual mode. Note the capital J and K since while in visual mode you'll want to use j and k for moving around.

  { "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" }
      ]
  },
like image 45
Shaun Dychko Avatar answered Sep 23 '25 14:09

Shaun Dychko



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!