2013-02-02 67 views

回答

10

documentation -

Vintage starts in insert mode by default. This can be changed by adding: 

"vintage_start_in_command_mode": true 

to your User Settings. 

,然後 -

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 } 
    ] 
} 
1

我發現下面是Preferences -> Key Bindings - User便利,因爲它也退出可視模式。請注意大寫字母J和K,因爲在視覺模式下,您將需要使用j和k來移動。

{ "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" } 
     ] 
    }, 
相關問題