2017-04-25 3 views
0

Ich benutze Vim-Modus in sublime Text 3, ich möchte ctrl+[ anstelle von esc verwenden.Wie setze ich Strg + [statt Flucht in sublimen Text 3?

Das ist mein keymap config:

[ 
    // vim_mode 
    // exit insert mode, same to 'esc' 
    { "keys": ["ctrl+["], 
     "command": 
     [ 
      "single_selection", 
      "clear_fields", 
      "hide_auto_complete", 
      "hide_overlay", 
      "hide_popup", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
     ], 
     "args": { "cancel": true }, 
     "context": 
     [ 
      { "key": "num_selections", "operator": "not_equal", "operand": 1 } 
     ] 
    }, 
    { "keys": ["ctrl+["], 
     "command": 
     [ 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
     ], 
     "args": { "cancel": true }, 
     "context": 
     [ 
      { "key": "has_next_field", "operator": "equal", "operand": true } 
     ] 
    }, 
    { "keys": ["ctrl+["], 
     "command": 
     [ 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
     ], 
     "args": { "cancel": true }, 
     "context": 
     [ 
      { "key": "has_prev_field", "operator": "equal", "operand": true } 
     ] 
    }, 
    { "keys": ["ctrl+["], 
     "command": 
     [ 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
     ], 
     "args": { "cancel": true }, 
     "context": 
     [ 
      { "key": "panel_visible", "operator": "equal", "operand": true } 
     ] 
    }, 
    { "keys": ["ctrl+["], 
     "command": 
     [ 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
     ], 
     "args": { "cancel": true }, 
     "context": 
     [ 
      { "key": "overlay_visible", "operator": "equal", "operand": true } 
     ] 
    }, 
    { "keys": ["ctrl+["], 
     "command": 
     [ 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "hide_panel", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
     ], 
     "args": { "cancel": true }, 
     "context": 
     [ 
      { "key": "popup_visible", "operator": "equal", "operand": true } 
     ] 
    }, 
    { "keys": ["ctrl+["], 
     "command": 
     [ 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
      "hide_overlay", 
      "clear_fields", 
      "hide_popup", 
      "hide_auto_complete", 
      "exit_insert_mode", 
      "enter_visual_mode", 
      "hide_panel", 
     ], 
     "args": { "cancel": true }, 
     "context": 
     [ 
      { "key": "auto_complete_visible", "operator": "equal", "operand": true } 
     ] 
    }, 
    { 
     // auto_complete 
     // use tab to forward to next completion source 
     "keys": ["ctrl+n"], 
     "command": "move", 
     "args": { "by": "lines", "forward": true }, 
     "context": 
     [ 
      { "key": "auto_complete_visible" }, 
     ], 
    }, 
    { 
     // auto_complete 
     // use tab to backward to prev completion source 
     "keys": ["ctrl+p"], 
     "command": "move", 
     "args": { "by": "lines", "forward": false }, 
     "context": 
     [ 
      { "key": "auto_complete_visible" }, 
     ], 
    }, 
] 

, nachdem ich alle escape commands und vim exit insert mode zu ctrl+[ Karte, wenn ich dieses Typs: enter image description here

die ctrl+[ funktioniert nicht, die Auswahl wird nicht verschwinden bis ich die esc drücke.

Warum ctrl+[ kann es nicht verschwinden lassen?

+0

Sie erstellen Ihre Tastenkombination auf die falsche Art und Weise der 'Befehl' muss eine Zeichenfolge und kein Array sein. Kopieren Sie einfach alle 'esc' Tastenkürzel aus den Standardtastenbelegungen in Ihre Tastenbelegung und ändern Sie' esc' in 'ctrl + ['. Kopieren Sie außerdem die Escape-Tastenkombination aus dem Vintage-Pack und fügen Sie sie mit der Priorität ein, die Sie haben möchten. Wenn Sie mit einem Tastendruck in einen "sauberen" Normalmodus wechseln möchten, ist dies ebenfalls möglich, aber nicht so. –

+0

@ r-stein, bitte sag mir, wie man mit einer esc presse in einen "sauberen" normalen Modus flüchten kann. das ist genau das, was ich brauche. – linrongbin

Antwort

2

Sie können einen einzelnen Befehl erstellen, um in einen sauberen Befehlsmodus zu wechseln, indem Sie ChainOfCommand installieren (oder ein Makro erstellen) und alle "exit" -Befehle gleichzeitig aufrufen. Installieren Sie es einfach und fügen Sie es in Ihre Tastaturbelegung ein:

Verwandte Themen