常用优质插件的用法
TODO+

创建一个
TODO列表问题件
安装 ext install vscode-todo-plus
常用命令
|
|
快捷键
|
|
常用配置
|
|
示例文件
|
|
Bookmarks

快捷键
|
|
常用命令
|
|
常用配置
|
|
Markdown All in One

可以方便的编辑Markdown文件
快捷键
|
|
常用配置
|
|
常用插件分类
代码高亮与语言支持
vscode wxml
提供对微信小程序
wxml语法高亮的支持。
Vetur
提供对Vue的支持,资料: Vetur Doc - GitBook
Snippet
|
|
常用配置
|
|
智能感知
|
|
|
|
Weex
提供 vuejs (.vue)、weex (.we) 的语言支持, Weex官网地址 。
TODO Highlight

高亮关键字
|
|
常用命令
|
|
常用配置
|
|
vue-ls
这个扩展为 VSCode 增加了 vue 语言服务,解决 vue 单文件组件(.vue)文件的语法识别问题。
.vuelsrc文件配置
To support file path alias
|
|
HTML CSS Support
让 html 标签上写class 智能提示当前项目所支持的样式,新版已经支持scss文件检索。
代码验证
- ESLint 提供ECMAScript代码验证
- TSLint 提供TypeScript代码验证
stylelint
css/less/scss验证
puglint

HTMLHint

Code Spell Checker

代码提示与自动完成
- Vue 2 Snippets
- HTML CSS Support
- Modern (ES6+) Javascript Snippets
- Bootstrap 3 Snippets
- Bootstrap 4 & Font awesome snippets
vscode-wechat
提供小程序开发对应的wxml、wxss语法高亮支持,并提供对应的 snippets
Vue VSCode Snippets
Snippet
|
|
VueHelper
Snippets and more feature
fileheader
添加文件头,包括用户名、更新日期,使用Ctrl + Alt + I进行标记。
配置文件:
|
|
Document This
为js和ts添加JSDoc风格的注释,使用Ctrl + Alt + D + D 激活。
jQuery Code Snippets

Easy LESS

:emojisense:

常用配置:
|
|
Emoji
智能感知
IntelliSense for CSS class names

Path Intellisense
自动路劲补全
Npm Intellisense
require 时的包提示(最新版的vscode已经集成此功能)
Atuo Rename Tag
自动完成标签名修改匹配
代码美化
Pug beautify

常用命令
|
|
vscode-json
快捷键
|
|
常用命令
|
|
JS-CSS-HTML Formatter
常用命令
|
|
配置文件
|
|
Beautify
keybindings.json 配置
|
|
.jsbeautifyrc 配置
在项目根目录下新建.jsbeautifyrc进行配置,使用快捷键ctrl + B即可代码格式化。
|
|
可用的配置映射:
| .jsbeautifyrc setting | VS Code setting |
|---|---|
| eol | files.eol |
| tab_size | editor.tabSize |
| indent_with_tabs (inverted) | editor.insertSpaces |
| wrap_line_length | html.format.wrapLineLength |
| unformatted | html.format.unformatted |
| indent_inner_html | html.format.indentInnerHtml |
| preserve_newlines | html.format.preserveNewLines |
| max_preserve_newlines | html.format.maxPreserveNewLines |
| indent_handlebars | html.format.indentHandlebars |
| end_with_newline | html.format.endWithNewline (html) |
| end_with_newline | file.insertFinalNewLine (css, js) |
| extra_liners | html.format.extraLiners |
| space_after_anon_function | javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions |
| space_in_paren | javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis |
模板预览
Pug to HTML
常用命令
|
|
Preview
A previewer of Markdown, ReStructured Text, HTML, Jade, Pug, Mermaid files, Image’s URI or CSS properties for Visual Studio Code.
命令工具
界面主题、图标与颜色
- Material Theme Material Icon Theme
- Easy icon theme
- vscode-icons
- VSCode Great Icons
- Dracula 官网
- One Dark Pro
- One Monokai Theme
- Darcula
Output Colorizer
让控制台输出增添色彩。
按键映射
括号匹配
Bracket Pair Colorizer
让括号拥有独立的颜色,易于区分。可以配合任意主题使用。
Subtle Brackets
为括号匹配增加样式。
配置文件:
|
|
bracket-jumper
在匹配的括号之间跳转。
快捷键:
|
|
Bracket Selection
选择匹配括号之间的内容。
版本控制
Git Lens
丰富的git日志插件。
项目管理
Project Manager
在多个项目之前快速切换的工具。
其他
- PHP Debug
- PHP Extension Pack
- Debugger for Chrome
- Code Outline
- VSNotes
- Auto Close Tag 标签自动闭合
- Code Runner 代码运行
Code Runner
To run code:
- use shortcut
Ctrl+Alt+N - or press
F1and then select/typeRun Code, - or right click the Text Editor and then click
Run Codein editor context menu - or click
Run Codebutton in edit - or title menuor click
Run Codebutton in context menu of file explorer
To stop the running code:
- use shortcut
Ctrl+Alt+M - or press
F1and then select/typeStop Code Run - or right click the Output Channel and then click
Stop Code Runin context menu
Document This
为js和ts添加JSDoc风格的注释,使用Ctrl + Alt + D + D 激活。
filesize
在状态栏显示文件大小,点击后还可以看到详细创建、修改时间。
Debugger for Chrome
让 vscode 映射 chrome 的 debug功能,静态页面都可以用 vscode 来打断点调试。
px2rem
一个CSS值转REM的VSCode插件