VS Code软件配置护眼模式和常用插件

572 阅读2分钟

下载地址

Visual Studio Code软件配置护眼模式和常用插件

1 vscode Vue2使用配置

1 设置代码编辑器为护眼模式

image.png

//打开settings.json,代码如下
{

  "window.zoomLevel": 1, //窗口.缩放级别
  "editor.tabSize": 2, //工作台主题颜色
  "breadcrumbs.enabled": false, // 开启 vscode 文件路径导航
  "window.enableMenuBarMnemonics": false,
  "liveServer.settings.donotShowInfoMsg": true,
  "workbench.colorTheme": "Default Light+",
  "workbench.colorCustomizations": { // 颜色设置
      "editor.background": "#C7EDCC",
      "sideBar.background": "#FAF9DE",
      "terminal.background": "#EAEAEF"
  },

  "editor.minimap.maxColumn": 50,
  "editor.fontSize": 12,
  "editor.indentSize": "tabSize",
  "editor.tabSize": 2,
  "extensions.ignoreRecommendations": true,
  "editor.detectIndentation": false,
  "editor.language.brackets": [],
  "vetur.format.options.tabSize": 2,
  "window.commandCenter": false,
  "workbench.layoutControl.enabled": false,
  "explorer.confirmDelete": false,
  "workbench.startupEditor": "none"

}
2 vsCode 常用插件

Chinese (Simplified) Language(必备)  中文显示 安装完之后重启vscode

Path Intellisense (必备)  自动提示文件路径,支持各种快速引入文件

Vetur (推荐)(vue必备)  Vue多功能集成插件

Auto Close Tag (必备)  自动闭合HTML/XML标签

Auto Rename Tag (必备)  自动完成另一侧标签的同步修改

ESLint (推荐)  js语法纠错

jQuery Code Snippets (推荐)  jQuery代码智能提示

JavaScript(ES6) code snippets (推荐)  ES6语法智能提示,以及快速输入

Turbo Console Log快捷添加 console.log,一键 注释 / 启用 / 删除 所有 console.log

简单说下这个插件要用到的快捷键:
ctrl + alt + l 选中变量之后,使用这个快捷键生成 console.log
alt + shift + c 注释所有 console.log
alt + shift + u 启用所有 console.log
alt + shift + d 删除所有 console.log

—————————————————————————————

2 vscode Vue3使用配置

  1. Auto Close Tag (必备)  自动闭合HTML/XML标签
  2. Auto Rename Tag (必备)  自动完成另一侧标签的同步修改
  3. Chinese (Simplified) Language(必备)  中文显示 安装完之后重启vscode
  4. GitHub Theme 主题颜色 light(不喜欢可以不安装此插件)

image.png

  1. ESLint (推荐)  js语法纠错
  2. Path Intellisense (必备)  自动提示文件路径,支持各种快速引入文件
  3. lokalise.i18n-ally 国际化提示 把下面的 json 代码添加到vscode 的 settings.json` 中
"i18n-ally.localesPaths": "locales",
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.namespace": true,
"i18n-ally.enabledParsers": ["yaml", "js"],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.displayLanguage": "zh-CN",
"i18n-ally.enabledFrameworks": ["vue"]
  1. bradlc.vscode-tailwindcss Tailwind CSS

  2. TypeScript Vue Plugin (Volar)

  3. Vite

  4. Vue

  5. Vue 3 Snippets?

  6. Vue Language Features (Volar)?

  7. Vue Peek?