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


相关推荐

  • MongoVUE_mongodb怎么用

    MongoVUE_mongodb怎么用一、查询位号名name以A05或者A08开头的值{$or:[{name:/A05.*/},{name:/A08.*/}]}二、查询时间范围

    2022年8月21日
    5
  • mt4历史数据回测_mt410年历史数据

    mt4历史数据回测_mt410年历史数据这个网站只能下载2001年-当前时间前一个月的数据,还是挺全的。但是下载下来之后好像是一分钟图的,妈蛋其实我想要1小时图的EURUSD历史数据。网站地址:http://www.fxfupan.com/datacenter.html它们网站上的复盘大师可以试下,回去我就试下看看他们的软件怎么样刚才找到一个更好的,上面的东西可以不必看了。福汇官方有个历史数据下载器软件(初阶免费),登录自己的福汇账号,…

    2022年8月15日
    5
  • HTML 动画(一)[通俗易懂]

    HTML 动画(一)[通俗易懂]入场动画(一)图片从左至右逐渐消失实现逻辑:a:将遮罩分割为数个div,多个div通过图片定位拼接成一张图片;b:运用requestAnimationFrame+animation实现动画;c:遮罩层网格状逐步消失设置background-position:0;2.效果图:3.代码:<!DOCTYPEhtml><htmllang=”en”&…

    2022年6月29日
    27
  • 回文子串的个数_统计回文子串的个数

    回文子串的个数_统计回文子串的个数1、题目描述本题要求统计一个字符串中包含多少个回文子串。首先我们来确定子串的概念:一个字符串的子串,就是指它本身的各个部分。如字符串“aba”的子串有“a”、“b”

    2022年10月16日
    3
  • Thread之ParameterizedThreadStart

    Thread之ParameterizedThreadStartTreadStart委托仅仅指向无参数且无返回值的方法。如果新线程上运行带参数的方法,那么需要用到ParameterizedThreadStart委托,ParameterizedThreadStart定义:publicdelegatevoidParameterizedThreadStart(objectobj);一:要求只能有一个参数,且为object类型二:无返回值T…

    2022年7月15日
    16
  • js如何实现页面跳转_js当前页面跳转

    js如何实现页面跳转_js当前页面跳转文章转载自:  js页面跳转的几种代码    http://www.studyofnet.com/news/185.html 页面跳转方式 1.在原来的窗体中直接跳转用window.location.href=”你所要跳转的页面”;window.history.back(-1);返回上一页window.history.history.back()wind

    2022年8月13日
    8

发表回复

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

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