hba*_*hba 11 visual-studio-code vscode-settings
我一直在'试验'我的vs-code键绑定.
我想将键绑定重置为原始设置.
我怎么做?
我在Linux Mint 18上.
我确实删除了keybindings.json中的所有记录
Bes*_*ohn 13
以下是重置VS代码中的键绑定的步骤.
我们还需要另一个答案吗?也许不是,但每年左右我都会发现自己会筛选此页面上的信息,因此为了下次更快,这里有一些注释:
要查找设置的位置,您可以在首选项中查找指向 json 文件的按钮/链接。但是,我发现在硬盘上查找 json 文件比在应用程序内找到该按钮/链接更容易(一些用户报告该按钮/链接在应用程序的某些版本中丢失)。如果您的操作系统不允许您搜索系统文件,请打开终端会话并输入$ locate keybindings.json.
如果您可以记住快捷键,则可以将您带到按钮/链接的典型默认快捷键是CMD+SHIFT+P。此快捷方式会在主工具栏下方打开一个框,您可以在该框中键入“ json ”以查找指向 json 文件的按钮/链接。
常规设置位于settings.json
键盘设置位于keybindings.json
苹果系统:~/Library/Application Support/Code/User/
keybindings.json 的示例
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "cmd+r cmd+r",
"command": "workbench.action.reloadWindow",
"when": "isDevelopment"
},
{
"key": "cmd+r",
"command": "-workbench.action.reloadWindow",
"when": "isDevelopment"
},
{
"key": "shift+cmd+c shift+cmd+c",
"command": "workbench.action.terminal.openNativeConsole",
"when": "!terminalFocus"
},
{
"key": "shift+cmd+c",
"command": "-workbench.action.terminal.openNativeConsole",
"when": "!terminalFocus"
},
{
"key": "ctrl+cmd+c",
"command": "editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+shift+alt+cmd+[Minus]",
"command": "-editor.action.commentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+cmd+c",
"command": "editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+a",
"command": "-editor.action.blockComment",
"when": "editorTextFocus && !editorReadonly"
}
]
Run Code Online (Sandbox Code Playgroud)
请注意,映射已在使用的组合键可能会导致冲突。因此,最好的方法是首先将默认绑定重新映射到其他内容。例如,上面的"-"that 前缀"-editor.action.blockComment"用于抑制默认绑定。因此,您可能会发现您的按键绑定最好成对设置(除非您首选的组合非常罕见)。
设置.json 的示例
{
"workbench.colorTheme": "Solarized Light",
"window.zoomLevel": 4,
"workbench.activityBar.visible": false,
"workbench.statusBar.visible": false,
"editor.quickSuggestions": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.acceptSuggestionOnCommitCharacter": false
}
Run Code Online (Sandbox Code Playgroud)
尝试有关 VSCode 中的键绑定的文档页面: https ://code.visualstudio.com/docs/getstarted/keybindings
打开包含用户设置的目录 ( https://code.visualstudio.com/docs/getstarted/settings ) 并尝试删除用户键绑定文件。
| 归档时间: |
|
| 查看次数: |
17039 次 |
| 最近记录: |