vscode json自定义设置光标快捷键上下左右移动

一、打开配置文件

  如下图所示路径:文件 -> 首选项 -> 键盘快捷方式 -> 打开键盘快捷方式json(右上角步骤3文件图标)。
在这里插入图片描述

二、复制配置文件

  将下面文档复制到打开的文档中即可,如自定义:

  • 删除光标左侧所有内容: Ctrl + Backspace
  • 删除光标右侧所有内容: Alt + Backspace
// Place your key bindings in this file to override the defaultsauto[]
 
[
    {
      "key": "alt+i",
      "command": "cursorUp",
      "when": "textInputFocus"
    },
    {
      "key": "up",
      "command": "cursorUp",
      "when": "textInputFocus"
    },
    {
      "key": "alt+i",
      "command": "selectPrevSuggestion",
      "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
    },
    {
      "key": "up",
      "command": "selectPrevSuggestion",
      "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
    },
 
    {
      "key": "alt+k",
      "command": "cursorDown",
      "when": "textInputFocus"
    },
    {
      "key": "down",
      "command": "cursorDown",
      "when": "textInputFocus"
    },
    {
      "key": "alt+k",
      "command": "selectNextSuggestion",
      "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
    },
    {
      "key": "down",
      "command": "-selectNextSuggestion",
      "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
    },
 
    {
      "key": "alt+l",
      "command": "cursorRight",
      "when": "textInputFocus"
    },
    {
      "key": "right",
      "command": "cursorRight",
      "when": "textInputFocus"
    },
 
    {
      "key": "alt+j",
      "command": "cursorLeft",
      "when": "textInputFocus"
    },
    {
      "key": "left",
      "command": "cursorLeft",
      "when": "textInputFocus"
    },
 
    {
      "key": "alt+o",
      "command": "cursorEnd",
      "when": "textInputFocus"
    },
    {
      "key": "end",
      "command": "cursorEnd",
      "when": "textInputFocus"
    },
 
    {
      "key": "alt+u",
      "command": "cursorHome",
      "when": "textInputFocus"
    },
    {
      "key": "home",
      "command": "cursorHome",
      "when": "textInputFocus"
    }
    {
      "key": "alt+backspace",
      "command": "deleteAllRight",
      "when": "textInputFocus"
    }
    {
      "key": "ctrl+backspace",
      "command": "deleteAllLeft",
      "when": "textInputFocus"
    }
 
]
  
  

猜你喜欢

转载自blog.csdn.net/qq_38429958/article/details/126841403