2016-12-07 23 views
0

我新推出VS代碼我想將提示接受鍵從「Enter」更改爲「space」和「。」。更改提示接受VS代碼中的密鑰

當然,這關鍵工作在普通編輯,只有當提示欄打開工作

我試圖像這樣的keybinding.json

// Place your key bindings in this file to overwrite the defaults 
[ 
     { 
      "key": "space", 
      "command": "repl.action.acceptInput", 
      "when": "parameterHintsVisible" 
     } 
] 

,但它不工作,我在那裏出錯了?

回答

1

我相信你正在尋找的命令是acceptSelectedSuggestionOnEnter

{ 
    "key": "space", 
    "command": "acceptSelectedSuggestionOnEnter", 
    "when": "acceptSuggestionOnEnter && editorTextFocus && suggestWidgetVisible" 
} 
+0

是的,這就是我想要的。謝謝,但現在我必須按「」。兩次接受建議另一個爲代碼部分輸入它如何可以使它的? :d –