[原创]vscode神速快捷键分享以及修改教程

文件首选项-键快捷方式-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开源代码修改的。。哈哈,果然牛逼,这东西是跨平台的,我认为是目前最好的轻量级可扩展的工具了,俄罗斯的全家桶都是渣渣,哈哈

这是我见过的最方便自定义快捷键的神器了,赶紧翻出来之前有道云的笔记,直接粘贴应该就能用了。

image.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 就可以解决问题啦

ba
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值