将 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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 学习计算机一个很好的免费资料下载网站地址(大家学习网论坛)

    学习计算机一个很好的免费资料下载网站地址(大家学习网论坛)原文发布时间为:2008-07-30——来源于本人的百度文章[由搬家工具导入]http://club.topsage.com子版面本版版规3today全国计算机等级考试版主:妖僧三

    2022年7月2日
    32
  • goland 激活码 2021 11月_在线激活

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

    2022年3月28日
    79
  • 第一个汇编程序「建议收藏」

    第一个汇编程序「建议收藏」本文将开始编写完整的汇编语言程序,用编译器将它们编译成为可执行文件(如:*.exe文件),在操作系统中运行。本文地址:http://www.cnblogs.com/archimedes/p/assem

    2022年8月4日
    6
  • 在pycharm中使用tensorflow_使用中是什么意思

    在pycharm中使用tensorflow_使用中是什么意思QtDesigner的介绍在PyQt中编写UI界面可以直接通过代码来实现,也可以通过QtDesigner来完成。QtDesigner的设计符合MVC的架构,其实现了视图和逻辑的分离,从而实现了开发的便捷。QtDesigner中的操作方式十分灵活,其通过拖拽的方式放置控件可以随时查看控件效果。QtDesigner生成的.ui文件(实质上是XML格式的文件)也可以通过pyuic5工具转换成…

    2022年8月28日
    3
  • (七十)Android O Service启动流程梳理——bindService

    (七十)Android O Service启动流程梳理——bindService前言:最近在处理anr问题的时候迫切需要搞清楚service的启动流程,抽时间梳理一下。1.service启动简述service启动分三种,比较简单的就是startService,AndroidO用于后台应用启动前台服务的startForegroundService和绑定服务的bindService。本篇继(六十四)AndroidOService启动流程梳理——startService 继续…

    2022年6月4日
    99
  • 倒立摆及其应用//2021-2-23[通俗易懂]

    倒立摆及其应用//2021-2-23[通俗易懂]前言:以前搞电赛的时候搞过Pid平衡小车,倒立摆基本实现方法与平衡小车差不多,有一次刚院跑到实验室唠嗑,问你知不知道倒立摆的应用?我说不知道,他说航天火箭····,你们的这些常识太少了,落下这句话就走了,故为了解这些常识,有此小文。正文:一、倒立摆(invertedpendulum)1.概述倒立摆,InvertedPendulum,是典型的多变量、高阶次(有些还分几阶倒立摆【PID中涉及角度还有角速度这样来看多变量高阶层就不难理解了】),非线性、强耦合、自然不稳定系统。倒…

    2022年8月18日
    10

发表回复

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

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