vscode常用指令

目的:旨在操作舒适,适合自我,自由搭配

如何替换快捷键

操作路径
左下角设置 -> 键盘快捷键方式 -> 搜索(如 editor.action.changeAll


常用快捷键

  1. 替换相同变量(会全局替换)
{
  "key": "shift+f6",
  "command": "editor.action.changeAll",
  "when": "editorTextFocus && !editorReadonly"
}
同步修改变量
  1. 重构-替换方法名
{
  "key": "f2",
  "command": "editor.action.rename",
  "when": "editorHasRenameProvider && editorTextFocus && !editorReadonly"
}
替换方法名
  1. 转大写
{
  "key": "shift+cmd+u",
  "command": "editor.action.transformToUppercase"
}
  1. 转小写
{
  "key": "shift+cmd+d",
  "command": "editor.action.transformToLowercase"
}
  1. 转驼峰命名
{
  "key": "shift+cmd+j shift+cmd+u",
  "command": "editor.action.transformToCamelcase"
}
  1. 转首字母大写
{
  "key": "shift+cmd+g shift+cmd+u",
  "command": "editor.action.transformToTitlecase"
}
  1. 多光标修改

option+鼠标左键 点点点

  1. 快速切换已打开文件
    Ctrl+Tab

  2. 文件行跳转
    Ctrl + g

行跳转
  1. 符号跳转-内部方法名+参数
{
  "key": "cmd+k shift+o",
  "command": "workbench.action.compareEditor.openSide",
  "when": "inDiffEditor"
}
  1. 定义和实现间跳转
{
  "key": "cmd+f12",
  "command": "editor.action.revealDefinition",
  "when": "editorHasDefinitionProvider && editorTextFocus && isWeb"
}
{
  "key": "cmd+f12",
  "command": "editor.action.goToImplementation",
  "when": "editorHasImplementationProvider && editorTextFocus"
}
  1. 跳转引用
{
  "key": "shift+f12",
  "command": "editor.action.goToReferences",
  "when": "editorHasReferenceProvider && editorTextFocus && !inReferenceSearchEditor && !isInEmbeddedEditor"
}
跳转到引用
  1. 折叠代码
{
  "key": "alt+cmd+[",
  "command": "notebook.fold",
  "when": "notebookEditorFocused && !inputFocus && activeEditor == 'workbench.editor.notebook'"
}
{
  "key": "alt+cmd+[",
  "command": "editor.fold",
  "when": "editorTextFocus && foldingEnabled"
}
  1. 展开折叠代码
{
  "key": "alt+cmd+]",
  "command": "notebook.unfold",
  "when": "notebookEditorFocused && !inputFocus && activeEditor == 'workbench.editor.notebook'"
}
{
  "key": "alt+cmd+]",
  "command": "editor.unfold",
  "when": "editorTextFocus && foldingEnabled"
}
  1. 减少缩进
{
  "key": "cmd+[",
  "command": "editor.action.outdentLines",
  "when": "editorTextFocus && !editorReadonly"
}
  1. 增加缩进
{
  "key": "cmd+]",
  "command": "editor.action.indentLines",
  "when": "editorTextFocus && !editorReadonly"
}
  1. 分屏快捷键

快捷键:
cmd + \

  1. 分屏后切换 Tab

快捷键:
cmd + 1、cmd + 2、cmd + 3

19.往后切换修改位置

{
  "key": "alt+cmd+left",
  "command": "workbench.action.navigateBack",
  "when": "canNavigateBack"
}

20.向后切换修改位置

{
  "key": "alt+cmd+right",
  "command": "workbench.action.navigateForward",
  "when": "canNavigateForward"
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 十大Intellij IDEA快捷键 1 智能提示 Intellij首当其冲的当然就是Intelligence智能...
    月生89阅读 423评论 0 0
  • 在Xcode 6中有许多快捷键的设定可以使得你的编程工作更为高效,对于在代码文件中快速导航、定位Bug以及新增应用...
    PlatonsDream阅读 19,129评论 1 11
  • 插件列表: Color Info 这个便捷的插件,将为你提供你在CSS 中使用颜色的相关信息。你只需在颜色上悬...
    骑着蜗牛撵大象阅读 13,041评论 0 2
  • 此文章摘抄与https://www.jianshu.com/p/c855b260afbd 熟悉并更强大的快捷键 c...
    翟书东阅读 1,139评论 0 0
  • 下面主要是针对vscode-vim的使用指南,1-9节的内容是通用的,但是后面的内容是vscode-vim特有的功...
    mudssky阅读 1,443评论 0 0