vscode 快捷键设置,极速开发

目前见过最快的编辑器是vim,看到大佬使用vim的输入速度,瞬间献下膝盖。
然后在vscode里找到了,vim插件,经过一番折腾,在入门之后,果断放弃。
原因是和现在的编辑习惯相差太大,且经常造成编辑器卡顿。所以,编辑器不是目的,快速输入才是目的,那通过设置快捷键,能不能达到类似vim的输入速度,经过一番尝试,不能达到,但是可以基本接近。
下面的快捷键设置,保留了编辑器原有快捷键,配合alt键的使用,可以让大部分操作手腕移动距离很小,就能实现方向切换,复制粘贴剪切,回到上一个编辑位置,选中上/下一个匹配项,选中行,删除行,代码折叠,智能选择,选中到行首/尾,插入上/下一行,单词键切换/选中等等。


 

// Place your key bindings in this file to override the defaultsauto[]
[
  // {
  //   "key": "enter",
  //   "command": "type",
  //   "args": { "text": "Hello World" },
  //   "when": "editorTextFocus"
  // },Hello World
  {
    "key": "ctrl+'",
    "command": "editor.action.insertSnippet",
    "args": {
      "snippet": "<body>【$TM_SELECTED_TEXT$0】</body>",
    },
    "when": "editorTextFocus"
  },
  {
    "key": "alt+'",
    "command": "editor.action.deleteLines",
    "when": "textInputFocus && !editorReadonly"
  },
  {
    "key": "alt+shift+backspace",
    "command": "editor.action.deleteLines",
    "when": "textInputFocus && !editorReadonly"
  },
  {
    "key": "ctrl+shift+a",
    "command": "editor.action.selectToBracket"
  },
  {
    "key": "alt+i",
    "command": "cursorUp",
    "when": "textInputFocus"
  },
  {
    "key": "alt+j",
    "command": "cursorLeft",
    "when": "textInputFocus"
  },
  {
    "key": "shift+alt+j",
    "command": "cursorColumnSelectLeft",
    "when": "textInputFocus && editorColumnSelection"
  },
  {
    "key": "shift+alt+j",
    "command": "cursorLeftSelect",
    "when": "textInputFocus"
  },
  {
    "key": "shift+alt+l",
    "command": "cursorRightSelect",
    "when": "textInputFocus"
  },
  {
    "key": "shift+alt+l",
    "command": "cursorColumnSelectRight",
    "when": "textInputFocus && editorColumnSelection"
  },
  {
    "key": "shift+alt+k",
    "command": "cursorDownSelect",
    "when": "textInputFocus"
  },
  {
    "key": "shift+alt+n",
    "command": "cursorUpSelect",
    "when": "textInputFocus"
  },
  {
    "key": "alt+y",
    "command": "editor.action.clipboardCopyAction"
  },
  {
    "key": "alt+p",
    "command": "editor.action.clipboardPasteAction"
  },
  {
    "key": "shift+alt+d",
    "command": "editor.action.copyLinesDownAction",
    "when": "textInputFocus && !editorReadonly"
  },
  {
    "key": "alt+d",
    "command": "editor.action.moveLinesDownAction",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "alt+m",
    "command": "editor.action.clipboardCutAction"
  },
  {
    "key": "alt+n",
    "command": "editor.action.addSelectionToNextFindMatch",
    "when": "editorFocus"
  },
  {
    "key": "alt+u",
    "command": "editor.action.moveLinesUpAction",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "ctrl+alt+l",
    "command": "cursorWordEndRightSelect",
    "when": "textInputFocus"
  },
  {
    "key": "alt+q",
    "command": "cursorWordLeft",
    "when": "textInputFocus"
  },
  {
    "key": "alt+w",
    "command": "cursorWordRight",
    "when": "textInputFocus"
  },
  {
    "key": "alt+enter",
    "command": "editor.action.insertLineAfter",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "alt+shift+enter",
    "command": "editor.action.insertLineBefore",
    "when": "editorTextFocus && !editorReadonly"
  },
  {
    "key": "ctrl+alt+j",
    "command": "cursorWordLeftSelect",
    "when": "textInputFocus"
  },
  {
    "key": "alt+l",
    "command": "cursorRight",
    "when": "textInputFocus"
  },
  {
    "key": "alt+backspace",
    "command": "deleteWordLeft",
    "when": "textInputFocus && !editorReadonly"
  },
  {
    "key": "alt+shift+[",
    "command": "editor.fold",
    "when": "editorTextFocus && foldingEnabled"
  },
  {
    "key": "alt+shift+]",
    "command": "editor.unfold",
    "when": "editorTextFocus && foldingEnabled"
  },
  {
    "key": "alt+k",
    "command": "cursorDown",
    "when": "textInputFocus"
  },
  {
    "key": "ctrl+shift+alt+left",
    "command": "-cursorColumnSelectLeft",
    "when": "textInputFocus"
  },
  {
    "key": "alt+o",
    "command": "editor.action.moveSelectionToPreviousFindMatch"
  },
  {
    "key": "alt+b",
    "command": "editor.action.moveSelectionToNextFindMatch"
  },
  {
    "key": "alt+oem_3",
    "command": "workbench.action.navigateBack"
  },
  {
    "key": "alt+left",
    "command": "workbench.action.navigateBack"
  },
  {
    "key": "shift+alt+right",
    "command": "editor.action.smartSelect.expand",
    "when": "editorTextFocus"
  },
  {
    "key": "alt+[",
    "command": "editor.action.smartSelect.expand",
    "when": "editorTextFocus"
  },
  {
    "key": "alt+]",
    "command": "editor.action.smartSelect.shrink",
    "when": "editorTextFocus"
  },
  {
    "key": "shift+alt+left",
    "command": "editor.action.smartSelect.shrink",
    "when": "editorTextFocus"
  }
]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值