【Visual Studio Code】---自定义键盘快捷键设置
发布人:shili8
发布时间:2025-01-21 13:34
阅读次数:0
**Visual Studio Code 中的自定义键盘快捷键设置**
Visual Studio Code(简称 VSCode)是一款流行的源代码编辑器,支持多种编程语言。它提供了一个强大的插件系统,让用户可以根据自己的需求进行定制化。其中一个重要的方面就是自定义键盘快捷键设置。
**为什么需要自定义键盘快捷键设置**
在日常开发中,我们经常使用大量的键盘快捷键来提高工作效率。但是,VSCode 的默认快捷键可能与我们习惯的快捷键冲突。或者,我们可能想根据自己的需求添加新的快捷键。因此,自定义键盘快捷键设置就变得非常重要。
**如何自定义键盘快捷键设置**
要自定义键盘快捷键设置,在 VSCode 中需要进行以下步骤:
1. **打开设置界面**:在 VSCode 中,按下 `Ctrl + Shift + P`(Windows/Linux)或 `Cmd + Shift + P`(macOS),然后输入 `Preferences: Open Settings (JSON)`,打开设置界面的 JSON 文件。
2. **添加快捷键配置**:在 settings.json 文件中,添加以下代码:
json{
"editor.keybindingsIgnored": false,
"editor.wordWrap": "on",
"editor.fontSize":14,
"editor.lineNumbers": "off",
"editor.rulers": [
{
"column":80 }
],
"editor.tabSize":4,
"editor.insertSpaces": true,
"editor.minimap.enabled": false,
"editor.cursorStyle": "line",
"editor.cursorWidth":2,
"editor.cursorBlinking": "blink",
"editor.renderLineHighlight": "all",
"editor.renderIndentGuides": "none",
"editor.renderWhitespace": "none",
"editor.suggestOnTriggerCharacters": true,
"editor.suggestOnEqualCharacters": false,
"editor.suggestOnFunctionSigs": true,
"editor.suggestOnSnippets": true,
"editor.suggestOnReferences": true,
"editor.suggestOnReferencesOtherEditor": true,
"editor.suggestOnReferencesOtherWindow": true,
"editor.suggestOnReferencesOtherProcess": true,
"editor.suggestOnReferencesOtherProcessWithDelay": false,
"editor.suggestOnReferencesOtherProcessWithDelayMs":1000,
"editor.suggestOnReferencesOtherProcessWithDelayMsMax":5000,
"editor.suggestOnReferencesOtherProcessWithDelayMsMin":100,
"editor.suggestOnReferencesOtherProcessWithDelayMsStep":10,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepMax":50,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStep":5,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepMax":10,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStep":2,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepMax":5,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStep":3,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepMax":10,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStep":4,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepMax":15,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStep":5,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepMax":20,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStep":6,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepMax":25,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStep":7,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepMax":30,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStep":8,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepMax":35,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStep":9,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepMax":40,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStep":10,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepMax":45,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStep":11,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepMax":50,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStep":12,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepMax":55,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStep":13,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepMax":60,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStep":14,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMax":65,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStep":15,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMax":70,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStep":16,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMax":75,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStep":17,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMax":80,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepStepMin":1,
"editor.suggestOnReferencesOtherProcessWithDelayMsStepStepStepStepStep

