将 VSCode 快捷键修改为 eclipse的快捷键[通俗易懂]

将 VSCode 快捷键修改为 eclipse的快捷键[通俗易懂]文章目录1、VSCode中打开`命令面板`,如下图所示。2)在命令面板中输入`keyboard`3)打开`首选项:打开键盘快捷方式(JSON)`4)在`keybindings.json`中配置快捷键配置1(常用的快捷键)配置2(最全的快捷键)1、VSCode中打开命令面板,如下图所示。2)在命令面板中输入keyboard在命令面板中输入keyboard,然后在列表中选择首选项:打开键盘快捷方式(JSON):3)打开首选项:打开键盘快捷方式(JSON)点击

大家好,又见面了,我是你们的朋友全栈君。

1、VSCode 中打开 命令面板,如下图所示。

在这里插入图片描述

2)在命令面板中输入 keyboard

在命令面板中输入 keyboard ,然后在列表中选择 首选项:打开键盘快捷方式(JSON)

在这里插入图片描述

3)打开 首选项:打开键盘快捷方式(JSON)

点击 首选项:打开键盘快捷方式(JSON) ,打开 keybindings.json 配置文件。

keybindings.json 的实际路径格式为

C:\Users\ 【用户】\AppData\Roaming\Code\User\

例如:

C:\Users\Administrator\AppData\Roaming\Code\User\
C:\Users\zhangsan\AppData\Roaming\Code\User\

如下图所示:
在这里插入图片描述

4)在 keybindings.json 中配置 快捷键

配置1(常用的快捷键)

// 将键绑定放在此文件中以覆盖默认值auto[]
[
    { 
   
        "key": "ctrl+d",
        "command": "-editor.action.addSelectionToNextFindMatch",
        "when": "editorFocus"
    },
    { 
   
        "key": "ctrl+d",
        "command": "editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+shift+k",
        "command": "-editor.action.deleteLines",
        "when": "textInputFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+alt+up",
        "command": "editor.action.copyLinesUpAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "shift+alt+up",
        "command": "-editor.action.copyLinesUpAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+alt+down",
        "command": "editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "shift+alt+down",
        "command": "-editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    // 在下面插入新行
    { 
   
        "key": "shift+enter",
        "command": "editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    }
    { 
   
        "key": "ctrl+enter", //ctrl+enter改为shift+enter
        "command": "editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    },
]

配置2(最全的快捷键)

// 将键绑定放入此文件中以覆盖默认值
[
    { 
    //行选定
        "key": "ctrl+i",
        "command": "expandLineSelection",
        "when": "editorTextFocus"
    },
    { 
    //重做
        "key": "ctrl+y",
        "command": "redo",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
    //增加注释行
        "key": "ctrl+k ctrl+c",
        "command": "editor.action.addCommentLine",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+shift+k", //与ctrl+d互换了
        "command": "editor.action.addSelectionToNextFindMatch",
        "when": "editorFocus"
    },
    { 
    //块注释
        "key": "ctrl+shift+/", //shift+alt+a
        "command": "editor.action.blockComment",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+alt+down", //shift+alt+down改为ctrl+alt+down
        "command": "editor.action.copyLinesDownAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+alt+up", //shift+alt+up改为ctrl+alt+up,互换!
        "command": "editor.action.copyLinesUpAction",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+d", //互换了 ctrl+shift+k
        "command": "editor.action.deleteLines",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+alt+l", // 格式化代码,由shift+alt+f改为ctrl+alt+l,互换!
        "command": "editor.action.formatDocument",
        "when": "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+k ctrl+f",
        "command": "editor.action.formatSelection",
        "when": "editorHasDocumentSelectionFormattingProvider && editorHasSelection && editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "f12",
        "command": "editor.action.goToDeclaration",
        "when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
    },
    { 
   
        "key": "ctrl+f12",
        "command": "editor.action.goToImplementation",
        "when": "editorHasImplementationProvider && editorTextFocus && !isInEmbeddedEditor"
    },
    { 
   
        "key": "shift+alt+up", // shift+alt+up互换,原为ctrl+alt+up
        "command": "editor.action.insertCursorAbove",
        "when": "editorTextFocus"
    },
    { 
   
        "key": "shift+alt+down", // shift+alt+down互换,原为ctrl+alt+up
        "command": "editor.action.insertCursorBelow",
        "when": "editorTextFocus"
    },

 // 在下面插入新行
    { 
   
        "key": "shift+enter", //ctrl+enter改为shift+enter
        "command": "editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "ctrl+enter", //ctrl+enter改为shift+enter
        "command": "editor.action.insertLineAfter",
        "when": "editorTextFocus && !editorReadonly"
    },
    // { 
   


    // "key": "ctrl+shift+enter",
    // "command": "editor.action.insertLineBefore",
    // "when": "editorTextFocus && !editorReadonly"
    // },
    { 
   
        "key": "alt+/", // ctrl+space 改为alt+/
        "command": "editor.action.triggerSuggest",
        "when": "editorHasCompletionItemProvider && editorTextFocus && !editorReadonly"
    },
    { 
   
        "key": "shift+alt+f", //与shift+alt+f互换,原为shift+alt+f
        "command": "rest-client.rerun-last-request",
        "when": "editorTextFocus && editorLangId == 'http'"
    },
    { 
   
        "key": "shift+alt+f", //与shift+alt+f互换,原为shift+alt+f
        "command": "rest-client.rerun-last-request",
        "when": "editorTextFocus && editorLangId == 'plaintext'"
    },
    { 
   
        "key": "shift+alt+f", //与shift+alt+f互换,原为shift+alt+f
        "command": "rest-client.rerun-last-request",
        "when": "resourceScheme == 'rest-response'"
    },
    { 
   
        "key": "ctrl+.", //原为ctrl+j
        "command": "workbench.action.togglePanel"
    },
   
]
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/136661.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • html颜色 dcfeff,css颜色编码对照表.doc

    html颜色 dcfeff,css颜色编码对照表.doccss颜色编码对照表tinaroad收录于2007-08-09阅读数:公众公开颜色名十六进制值RGB值PearlyGates#FFFFF2#fffff2PaleOlive#FBF5E6#fbf5e6white#FFFFFF#ffffffFrostedLime#F6F9ED#f6f9edWhiteOrchid#FDFDF0#fdfdf0GreenVeil#EEF3E2#eef3e2G…

    2022年5月13日
    36
  • osi七层模型各层功能简述(简述osi七层模型各层功能)

    读完本篇文章将会了解以下问题1.OSI的基本概念及原则2.OSI七层模型各层功能概述3.OSI七层模型举例4.OSI七层模型总结—————————————————————————————————————————…

    2022年4月10日
    64
  • 网页右下角小广告

    网页右下角小广告页面加载完成页面右下角出现小窗口,倒计时5秒关闭,也可自行手动关闭代码如下:<!DOCTYPE html><html lang="en"

    2022年7月2日
    25
  • Ubuntu安装显卡驱动教程

    Ubuntu安装显卡驱动教程一 参考资料环境搭建 01 Ubuntu16 04 如何查看显卡信息及安装 NVDIA 显卡驱动二 环境配置系统 Ubuntu16 04 显卡 NVIDIAGeForc 4GB 三 准备工作 1 根据电脑显卡型号 下载对应显卡驱动下载链接 博主对应下载的驱动版本 NVIDIA Linux x86 64 470 57 02 run2 将显卡驱动放到 home yichao Downloads 目录四 关键步骤 1 查看显卡型号 驱动 查看显卡型号 ubuntu

    2025年6月17日
    3
  • jetbrains 激活码(注册激活)「建议收藏」

    (jetbrains 激活码)2021最新分享一个能用的的激活码出来,希望能帮到需要激活的朋友。目前这个是能用的,但是用的人多了之后也会失效,会不定时更新的,大家持续关注此网站~https://javaforall.net/100143.htmlIntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,上面是详细链接哦~14…

    2022年3月30日
    781
  • 计算机网络vlan的作用,计算机网络之九:VLAN

    计算机网络vlan的作用,计算机网络之九:VLAN一:什么是VLAN广播在网络中起着非常重要的作用,如发现新设备,调整网络路径,IP地址租赁等,许多网络协议都要用到广播。然而,随着网络内计算机数量的增多,广播包的数量也会急剧增加,当广播包的数量占到通讯总量的30%时,网络的传输效率将会明显下降。所以当局域网内的计算机达到一定数量后,通常采用划分VLAN(虚拟局域网)的方式将网络分隔开来。将一个大的广播域划分为若干个小的广播域,以减小广播可能造成的…

    2022年8月10日
    5

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号