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


相关推荐

  • php中的<?= ?>和<?php ?>有什么区别么?

    php中的<?= ?>和<?php ?>有什么区别么?

    2022年2月8日
    42
  • 填充墙一般用什么材料_opencv填充封闭区域

    填充墙一般用什么材料_opencv填充封闭区域目录一、须知二、演示过程代码展示主函数展示原图运行结果三、总结一、须知本文章所提供代码不是自创,由于时间太久实在找不到来源,发布出来只为给大家提供便利,完全免费。话不多说,不想看文章的直接点击下载链接即可:点我.二、演示过程代码展示Matcop二值图intn填充比n小的孔洞函数默认为4连通如想改为8连通自行修改代码即可。#include”imfill.h”Matimfill(Matcop,intn){ Matdata=~cop; Matlabels,

    2022年9月12日
    0
  • CSDN有哪些值得学习的专栏?

    CSDN有哪些值得学习的专栏?马上2020年了,回顾2019这一年,CSDN哪些专栏受到了大家的喜爱呢?我们结合专栏的关注量、浏览量、用户反馈等多个方面,精选出一些专栏,分期分类推荐给你!涉及各类领域,带你从入门进阶实战!目录一、Java二、Python新三、C/C++四、AI五、OpenCV六、SpringBoot七、GO新八、其他新一、Java1、Java程序…

    2022年9月1日
    0
  • 下列那个类有获取PropertyDescriptor实例的方法_java反射怎么理解

    下列那个类有获取PropertyDescriptor实例的方法_java反射怎么理解JAVA中反射机制(JavaBean的内省与BeanUtils库)内省(Introspector)是Java语言对JavaBean类属性、事件的一种缺省处理方法。  JavaBean是一种特殊的类,主要用于传递数据信息,这种类中的方法主要用于访问私有的字段,且方法名符合某种命名规则。如果在两个模块之间传递信息,可以将信息封装进JavaBean中,这种对象称为“值对象”(ValueOb…

    2022年10月1日
    0
  • 我的世界java指令_我的世界java在哪下载

    我的世界java指令_我的世界java在哪下载Minecraft地图上的x,y和z坐标。以俯视的视角展示了X和Z轴的图像。红色高亮表示与标准不同的轴。坐标(coordinates)在数字上反映了玩家在世界中的位置。坐标基于一个由互相垂直且交于一点(即原点)的三条坐标轴形成的网格,即一个空间直角坐标系。x轴的正方向为东,其坐标反映了玩家距离原点在东(+)西(-)方向上的距离。z轴的正方向为南,其坐标反映了玩家距离原点在南(+)北(-)…

    2022年9月23日
    0
  • 回归算法应用场景实例二十则「建议收藏」

    回归算法应用场景实例二十则「建议收藏」回归算法应用场景实例二十则

    2022年4月21日
    39

发表回复

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

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