How to enter Vintage Command mode in Sublime Text

I'm on OSX. I'm pretty sure Vintage is on (I can see INSERT MODE in the status bar), but I can't get into COMMAND mode. How should I do it? The exit key is not working as I saw in some tutorials. Thank!

+3


source to share


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


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







All Articles