2016-02-03 59 views

回答

0

據我所知,在寫這篇文章的時候,Visual Studio代碼沒有這個選項,對不起。

2

在瀏覽默認的keybindings.json文件後,我想我們可以配置它。

首先,從文件>首選項>鍵盤快捷鍵調出密鑰綁定設置文件。

然後在右手邊,粘貼以下代碼:

// Place your key bindings in this file to overwrite the defaults 
[ 
    { 
     "key": "shift+9", // (
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+0", //) 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+,", // < 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+.", // > 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "[", 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "]", 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "space", 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": ",", 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+;", // : 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+/", // ? 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": ";", 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "=", 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "numpad_add", // + 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+=", // + 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+8", // * 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "numpad_multiply", // * 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "-", // - 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "numpad_subtract", // - 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "/", ///
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "numpad_divide", ///
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+7", // & 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    }, 
    { 
     "key": "shift+\\", // | 
     "command": "^acceptSelectedSuggestion", 
     "when": "editorTextFocus && suggestWidgetVisible && suggestionSupportsAcceptOnKey" 
    } 
] 

保存文件和密鑰綁定應立即生效。

如果您願意,您可以添加更多的提交字符,只需按照該模式。

+0

不夠感謝你!還加了'.'。 – Rudy

相關問題