文件首选项-键快捷方式-keybindings.json
alt+d删除行
alt+w移动当前行到上面一行
alt+s相反
ctrl+shift+f格式化
alt+u光标移动到行首
alt+o光标移动到行尾
ctrl+J跳转到指定行
shift+s在当前行下面插入一行
shift+w在当前行上面插入一行
alt+n复制当前行到下面一行
这是我常用的快捷键了还可以用alt+s保存文件。
ctrl+shift+o列出当前 页面的方法定义
shift+f12列出选择的方法在本项目所有的引用。
shift+alt+r修改方法名 变量名 等 默认快捷键是f2
ctrl+w 关闭当前文件
今天倒腾vscode,发现快捷键和之前的白鹭引擎一样,感情之前白鹭引擎能开发小程序实际上就是基于vscode开源代码修改的。。哈哈,果然牛逼,这东西是跨平台的,我认为是目前最好的轻量级可扩展的工具了,俄罗斯的全家桶都是渣渣,哈哈
这是我见过的最方便自定义快捷键的神器了,赶紧翻出来之前有道云的笔记,直接粘贴应该就能用了。
![[原创]vscode神速快捷键分享以及修改教程_开发工具](https://file.cfanz.cn/uploads/png/2022/11/24/5/2V6b4f9796.png)
image.png
![[原创]vscode神速快捷键分享以及修改教程_debug_02](https://file.cfanz.cn/uploads/png/2022/11/24/5/0Z3620G2Zd.png)
image.png
如上面右边默认是空白的,直接把下面的东西粘贴下去就ok.
// 使用当前快捷键设置覆盖默认设置
[
{
"key": "alt+d",
"command": "editor.action.deleteLines",
"when": "editorFocus"
},
{
"key": "alt+w",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus"
},
{
"key": "alt+s",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+f",
"command": "editor.action.format",
"when": "editorTextFocus"
},
{
"key": "f7",
"command": "workbench.action.debug.stepOut",
"when": "inDebugMode"
},
{
"key": "alt+u",
"command": "cursorHome",
"when": "editorTextFocus"
},
{
"key": "alt+o",
"command": "cursorEnd",
"when": "editorTextFocus"
},
{
"key": "ctrl+j",
"command": "workbench.action.gotoLine"
},
{
"key": "f6",
"command": "workbench.action.debug.stepOver",
"when": "inDebugMode"
},
{
"key": "shift+s",
"command": "editor.action.insertLineAfter",
"when": "editorTextFocus"
},
{
"key": "shift+w",
"command": "editor.action.insertLineBefore",
"when": "editorTextFocus"
},
{
"key": "alt+n",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus"
},
{
"key": "f5",
"command": "workbench.action.debug.stepInto",
"when": "inDebugMode"
},
{
"key": "shift+alt+r",
"command": "editor.action.rename",
"when": "editorTextFocus"
},
{
"key": "alt+i",
"command": "cursorUp",
"when": "textInputFocus"
},
{
"key": "alt+k",
"command": "cursorDown",
"when": "textInputFocus"
},
{
"key": "alt+j",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "alt+l",
"command": "cursorRight",
"when": "textInputFocus"
},
]
2021-12-18 12:22:30
支持alt+/
// 使用当前快捷键设置覆盖默认设置
[
{
"key": "alt+d",
"command": "editor.action.deleteLines",
"when": "editorFocus"
},
{
"key": "alt+w",
"command": "editor.action.moveLinesUpAction",
"when": "editorTextFocus"
},
{
"key": "alt+s",
"command": "editor.action.moveLinesDownAction",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+f",
"command": "editor.action.format",
"when": "editorTextFocus"
},
{
"key": "f7",
"command": "workbench.action.debug.stepOut",
"when": "inDebugMode"
},
{
"key": "alt+u",
"command": "cursorHome",
"when": "editorTextFocus"
},
{
"key": "alt+o",
"command": "cursorEnd",
"when": "editorTextFocus"
},
{
"key": "ctrl+j",
"command": "workbench.action.gotoLine"
},
{
"key": "f6",
"command": "workbench.action.debug.stepOver",
"when": "inDebugMode"
},
{
"key": "shift+s",
"command": "editor.action.insertLineAfter",
"when": "editorTextFocus"
},
{
"key": "shift+w",
"command": "editor.action.insertLineBefore",
"when": "editorTextFocus"
},
{
"key": "alt+n",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus"
},
{
"key": "f5",
"command": "workbench.action.debug.stepInto",
"when": "inDebugMode"
},
{
"key": "shift+alt+r",
"command": "editor.action.rename",
"when": "editorTextFocus"
},
{
"key": "alt+i",
"command": "cursorUp",
"when": "textInputFocus"
},
{
"key": "alt+k",
"command": "cursorDown",
"when": "textInputFocus"
},
{
"key": "alt+j",
"command": "cursorLeft",
"when": "textInputFocus"
},
{
"key": "alt+l",
"command": "cursorRight",
"when": "textInputFocus"
},
{
"key": "alt+oem_2",
"command": "notebook.cell.insertCodeCellBelow",
"when": "notebookCellListFocused && !inputFocus"
},
{
"key": "ctrl+enter",
"command": "-notebook.cell.insertCodeCellBelow",
"when": "notebookCellListFocused && !inputFocus"
},
{
"key": "alt+oem_2",
"command": "editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
},
{
"key": "ctrl+space",
"command": "-editor.action.triggerSuggest",
"when": "editorHasCompletionItemProvider && textInputFocus && !editorReadonly"
},
]
如果修改配置无效,点击下面所示的图标然后输入@recommended:keymaps 列出已安装的扩展,如图所示禁用visual studio keymap 就可以解决问题啦
![[原创]vscode神速快捷键分享以及修改教程_vim_03](https://file.cfanz.cn/uploads/png/2022/11/24/5/4WOJc18L9I.png)
ba










