欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 教育 > 幼教 > 开发工具 - VSCode 快捷键

开发工具 - VSCode 快捷键

2024/11/29 21:00:56 来源:https://blog.csdn.net/gklcsdn/article/details/143912258  浏览:    关键词:开发工具 - VSCode 快捷键

以下是一些常用的 VS Code 快捷键(Windows、macOS 和 Linux 均适用,略有不同):

常用快捷键

功能Windows/LinuxmacOS
打开命令面板Ctrl + Shift + PF1Cmd + Shift + P
打开文件Ctrl + OCmd + O
保存文件Ctrl + SCmd + S
全部保存Ctrl + K, SCmd + Option + S
关闭编辑器Ctrl + WCmd + W
关闭所有编辑器Ctrl + K, WCmd + K, W
新建文件Ctrl + NCmd + N

代码导航

功能Windows/LinuxmacOS
转到定义F12F12
查找所有引用Shift + F12Shift + F12
转到文件Ctrl + PCmd + P
转到行Ctrl + GCmd + G
转到符号Ctrl + Shift + OCmd + Shift + O

多光标和选择

功能Windows/LinuxmacOS
添加光标到下一行Ctrl + Alt + DownCmd + Option + Down
添加光标到上一行Ctrl + Alt + UpCmd + Option + Up
同时选中相同的单词Ctrl + DCmd + D
取消多光标EscEsc

编辑

功能Windows/LinuxmacOS
复制行/块Shift + Alt + DownOption + Shift + Down
删除行Ctrl + Shift + KCmd + Shift + K
移动行上/下Alt + Up/DownOption + Up/Down
格式化代码Shift + Alt + FShift + Option + F
显示建议Ctrl + SpaceCmd + Space

调试

功能Windows/LinuxmacOS
开始/继续调试F5F5
单步进入F11F11
单步跳过F10F10
停止调试Shift + F5Shift + F5

终端操作

功能Windows/LinuxmacOS
打开/关闭终端Ctrl + \`Cmd + ``
新建终端`Ctrl + Shift + ```Cmd + Shift + ``
切换终端Ctrl + Page Up/DownCmd + Page Up/Down

常用技巧

  1. 快速打开最近使用的文件

    • Ctrl + R(Windows/Linux)或 Cmd + R(macOS)
  2. 折叠/展开代码块

    • 折叠:Ctrl + Shift + [Cmd + Option + [
    • 展开:Ctrl + Shift + ]Cmd + Option + ]
  3. 切换侧边栏可见性

    • Ctrl + B(Windows/Linux)或 Cmd + B(macOS)

你也可以在 设置 -> 键盘快捷方式 中自定义这些快捷键!

设置vue模板

文件 - 首选项 - 用户片段   搜索vue.json文件,修改模板即可
快速生成模板:https://snippet-generator.app

vue.json 内容示例:

{"vue-template": {"prefix": "vue","body": ["<style lang=\"less\" scoped>","","</style>","","<template>","  <div>","","  </div>","</template>","","<script>","export default {","  mixins: [plugCx.IPlugBase],","  components: {},","  data()","  {","    return {","","    }","  },","  computed: {","","  },","  created()","  {","","  },","  mounted()","  {","","  },","  methods: {","    ","  }","}","</script>","",""],"description": "vue-template"}
}

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com