VScode commonly used must-have plug-ins

insert image description here
Visual Studio Code("VS Code" for short) is indispensable in the process of front-end development. vscodeAs a code editor, it is open source, free, and looks good. More importantly, rich plug-ins can improve development efficiency, and you deserve it. Most people in our team are using it, and we have also summarized the useful plug-ins. Next, from installation to use, we will learn and enrich your experience in detail VS Code.

VS Code installation and configuration

You can install the latest version here .

switch language

After the installation is complete, English is displayed by default. We can display Chinese by installing the Chinese language pack plug-in. The operation is as follows:

Open vscode, click the plug-in icon (or ⌘ + ⇧ + X), enter in the search box chinese, install:
insert image description here
use the shortcut key ⌘ + ⇧ + Pto open vscodethe command box, enter display, click Configure Display Language, switch language:
insert image description here

change theme

If you don’t like VS codeyour own theme color, you can also change the default theme, enter in the command box color theme, press Enter, you will enter the theme list, use the up and down keys to switch the theme, if you are not satisfied, it doesn’t matter, click to install other color themes, on the left will be A variety of theme plugins appear, just choose one to install.
insert image description here

add icon

We recommend an icon plugin vscode-icons. After successful installation, different icon styles will be added according to different file types, which will look more interesting.
insert image description here

Add code snippet

  • open 用户片段:
    insert image description here
  • Click 新代码片段and enter the fragment name in the input box:
    insert image description here
    insert image description here
  • Enter a custom code snippet
    insert image description here
  • Use in the code, enter vue3-template, select the newly created fragment
    insert image description here
    insert image description here

VS Code plugin

Auto Close Tag

self-closing HTML/XMLlabel:
insert image description here
usage.gif

Auto Rename Tag

Automatically rename HTML/XMLtags:
insert image description here
usage.gif

Autoprefix

Parses CSS and automatically prefixes:
insert image description here
usage.gif

Bracket Pair Colorizer

Useful for coloring matching brackets to make your code layered more clearly:
insert image description here
insert image description here

Code Runner

Run code snippets or code files in multiple languages
insert image description here
usage.gif

Code Spell Checker

Source code spell checker, prompting for misspelled words in the code
insert image description here
insert image description here

CSS Peek

Allow to view css, and locate from HTML file to css file, file definition jump
insert image description here
working.gif

DotENV

Support for .envfile syntax, highlighting
insert image description here
insert image description here

Draw.io Integration

Draw a flowchart in VS code, record your idea at any time, don't be too convenient
insert image description here
demo.gif

ESLint

The code format verification tool cooperates with the verification rules in the project to format the code when saving. It is a must for development and you deserve it!
insert image description here
Configuration file, add it in setting.json, you can refer to:

"editor.codeActionsOnSave": {
    
    
    "source.fixAll": true
},
"eslint.validate": [
    "javascript",
    "javascriptreact",
    "vue",
    "typescript",
    "typescriptreact"
],

Git History

Integrate git tools in VS code, view git records, file history, compare branches and submit code, etc.
insert image description here

Git Graph

Git Graph is a visual version control plug-in similar to SourceTree, which can update and submit code, view submission records, and review code
insert image description here
insert image description here
demo.gif

GitLens - Git supercharged

It is easy to check the submission record of each line of code, including the submitter, submission time, etc. If you don’t know which student modified the code, you can try it, it is clear
insert image description here
revision-navigation.gif

Highlight Matching Tag

Highlight matching tags
insert image description here
zIA1XCzK_o.gif

Image Preview

When you import, a thumbnail of the picture will be displayed on the left for easy preview
insert image description here
insert image description here

Import Cost

Display the size of the referenced package in the editor, so you can better understand the package you imported
insert image description here
insert image description here

Javascript console utils

Help you add console and delete console more quickly, it is really convenient

Selecting your variable, ⌘ + ⇧ + L, will output something like console.log(' test ', test )
⌘ + ⇧ + D, which will remove all console.log statements in the current document
insert image description here

koroFileHeader

The plug-in used to generate file header comments and function comments in vscode, after multiple iterations, the plug-in: supports all mainstream languages, powerful, flexible and convenient, complete documentation, easy to eat!

  • ⌃ + ⌘ + i, which can generate file header comments

    <!--
     * @Author: your name
     * @Date: 2021-11-18 18:08:32
     * @LastEditTime: 2021-11-19 11:29:00
     * @LastEditors: your name
     * @Description: 
     * @FilePath: 
    -->
    
  • ⌃ + ⌘ + t, automatically parse function parameters and generate function parameter comments

    /**
     * @description: 
     * @param {*} 
     * @return {*}
     */
    

insert image description here
function-params.gif

npm Intellisense

Code plugin to autocomplete NPM modules in import statements
insert image description here
auto_complete.gif

open in browser

Allows you to open the current file in your default browser or application.

⌥ + B, to open the default browser

insert image description here
insert image description here

Path Intellisense

Automatically identify the file path, making it easier to reference
insert image description here
iaHeUiDeTUZuo.gif

Prettier

A code formatting tool I like very much, you can also configure your own rules in the project
insert image description here

Svg Preview

Convenient svg file preview
insert image description here
demo.gif

All Tree

Tags added in the editor, such as todo and fixme, are quickly searched and displayed in a tree view in the explorer pane. Clicking on a todo in the tree will open the file and place the cursor on the line containing the TODO.
insert image description here
insert image description here

Trailing Spaces

Highlight trailing spaces and remove them quickly!
insert image description here
insert image description here

Volar

Same as vetur, volar is a vscode plugin for vue, which supports syntax support, highlighting, format verification, error detection, etc. of .vue files, but unlike vetur, volar provides more powerful functions
insert image description here
insert image description here

  • Editor shortcut split
    insert image description here
  • classtrace back
    insert image description here
  • langGrammar Tips
    insert image description here
    Just to list some, there are other functions, you must try!

Power Mode

insert image description here
demo-presets-flames.gif
demo-presets-fireworks.gif

If you have any useful plug-ins, you can also recommend them~

Guess you like

Origin blog.csdn.net/weixin_43363871/article/details/122041130