K
K
kisekiselack2016-07-30 15:08:19
Sublime Text
kisekiselack, 2016-07-30 15:08:19

Sublime Text Vintage mode - how to bind escape to capslock?

Hello! I use Vintage Mode. How to rebind in Sublime, exit from different modes on CapsLock?

{ "keys": ["escape"], "command": "exit_insert_mode",
  "context":
  [
    { "key": "setting.command_mode", "operand": false },
    { "key": "setting.is_widget", "operand": false }
  ]
},

{ "keys": ["escape"], "command": "exit_visual_mode",
  "context":
  [
    { "key": "setting.command_mode"},
    { "key": "num_selections", "operand": 1},
    { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": false }
  ]
},

{ "keys": ["escape"], "command": "hide_auto_complete", "context":
  [
    { "key": "auto_complete_visible", "operator": "equal", "operand": true }
  ]
},

{ "keys": ["escape"], "command": "vi_cancel_current_action", "context":
  [
    { "key": "setting.command_mode" },
    { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": false },
    { "key": "vi_has_input_state" }
  ]
},

{ "keys": ["ctrl+х"], "command": "exit_insert_mode",
  "context":
  [
    { "key": "setting.command_mode", "operand": false },
    { "key": "setting.is_widget", "operand": false },
    { "key": "setting.vintage_ctrl_keys" }
  ]
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Efimchuk, 2016-08-15
@oiu

{ "keys": ["capslock"], "command": "exit_insert_mode",
  "context":
  [
    { "key": "setting.command_mode", "operand": false },
    { "key": "setting.is_widget", "operand": false }
  ]
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question