vscode 快捷键设置
2019-01-18 本文已影响0人
Fairy_zhao
打开 文件 > 首选项 > 键盘快捷方式(K)
点击"{}"符号,加入下面代码在空的[]里
// 将键绑定放入此文件中以覆盖默认值
[
// ctrl+d 删除当前行
{
"key": "ctrl+d",
"command": "editor.action.deleteLines",
"when": "editorTextFocus && !editorReadonly"
},
// ctrl+shift+d 复制当前行到下一行
{
"key": "ctrl+shift+d",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
// ctrl+shift+f 格式化代码
{
"key": "ctrl+shift+f",
"command": "editor.action.formatDocument",
"when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
},
// alt+/ 代码提示
{
"key": "alt+/",
"command": "editor.action.triggerSuggest",
"when": "editorTextFocus"
},
// ctrl+shift+/ 多行注释
{
"key": "ctrl+shift+/",
"command": "editor.action.blockComment",
"when": "editorTextFocus"
}
]
其他配置,原文链接https://wefishbone.com/detail/5f0836a957c2942224fb4458