将 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"
},
]
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

  • 网线的交叉线和直通线原理

    网线的交叉线和直通线原理转载自 http://yxy73622.blog.163.com/blog/static/1733173742012231114013341/正线(标准568B):两端线序一样,线序是:白橙,橙,白绿,蓝,白蓝,绿,白棕,棕。反线(568A):一端为正线的线序,另一端为:白绿,绿,白橙,蓝,白蓝,橙,白棕,棕。T568A标准连线顺序从左到右依次为:1-绿白、2-绿、3-橙白、4

  • 使用cloudsim进行云计算仿真步骤_公司分析中最重要的是

    使用cloudsim进行云计算仿真步骤_公司分析中最重要的是CloudSimExample1展示如何创建一个只包含一个主机的数据中心,并且在其上运行一个云任务。首先附上CloudSimExample1全部代码:packageorg.cloudbus.cloudsim.examples;/**Title:CloudSimToolkit*Description:CloudSim(CloudSimulation…

    2022年10月13日
  • 对称加密算法常用的五种分组模式(ECB/CBC/CFB/OFB/CTR)「建议收藏」

    版权声明:本文为作者原创,如需转载,请注明出处https://blog.csdn.net/weixin_42940826注:以下图片来自于《图解密码学》,这本书讲的更全面细致,建议阅读,在我资源库中有此书,还有使用go语言具体实现和解释此书中的各种加密算法的文档,有需要的可以自习前往免费下载一图全览五种模式详解1.ECB-ElectronicCodeBook,电子密码本…

  • 【JAVA 课程设计 之 万年历】「建议收藏」

    距离2017年还有30多个小时~转眼间2016只剩一个尾巴了,大学生活也过了快一半了,自己却依旧那么笨手笨脚,不会的知识永远那么多,该看的书永远没机会去看,2017愿一切如昨天抽的签:远方不一定有诗,但有更好的自己~明天你好,请多关照~2017希望我的家人们,小伙伴们,以及所有帮助过我的朋友们都能健健康康,万事如意~Java课设远没有自己想的难,万年历,不用做显示面~也算2016JAVA的最后一

  • phpstorm 激活码2021【最新永久激活】

    (phpstorm 激活码2021)好多小伙伴总是说激活码老是失效,太麻烦,关注/收藏全栈君太难教程,2021永久激活的方法等着你。IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.cn/100143.htmlS32PGH0SQB-eyJsaWNlbnNlSW…

  • 蓝桥杯单片机必备知识—–(10)DS1302时钟

    蓝桥杯单片机必备知识—–(10)DS1302时钟

发表回复

您的电子邮箱地址不会被公开。

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