vscode设置快捷键控制光标移动(替代上下左右)

参考文档:https://blog.csdn.net/weixin_42158546/article/details/112463296

设置双快捷键控制光标上下左右移动

 

我的设置json文件如下

 

 

 

 

 追加配置文件:

复制代码

 {
        "key": "alt+k",
        "command": "cursorUp",
        "when": "textInputFocus"
      },
      {
        "key": "up",
        "command": "cursorUp",
        "when": "textInputFocus"
      },
      {
        "key": "alt+k",
        "command": "selectPrevSuggestion",
        "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
      },
      {
        "key": "up",
        "command": "selectPrevSuggestion",
        "when": "suggestWidgetMultipleSuggestions && suggestWidgetVisible && textInputFocus"
      },
      {
        "key": "alt+j",
        "command": "cursorDown",
        "when": "textInputFocus"
      },
      // {
      //   "key": "down",
      //   "command": "cursorDown",
      //   "when": "textInputFocus"
      // },
      {
        "key": "alt+j",
        "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+h",
        "command": "cursorLeft",
        "when": "textInputFocus"
      },
      {
        "key": "left",
        "command": "cursorLeft",
        "when": "textInputFocus"
      },
      {
        "key": "alt+i",
        "command": "cursorEnd",
        "when": "textInputFocus"
      },
      {
        "key": "end",
        "command": "cursorEnd",
        "when": "textInputFocus"
      },
      {
        "key": "alt+y",
        "command": "cursorHome",
        "when": "textInputFocus"
      },
      {
        "key": "home",
        "command": "cursorHome",
        "when": "textInputFocus"
      }
     
   
]

复制代码
posted @   小小仓鼠  阅读(324)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
点击右上角即可分享
微信分享提示