Problems encountered in the project are recorded for future reference and review 😁

VSCode code formatting shortcut keys

Shift + Alt + F
Copy the code

What is VSCode?

Visual Studio Code (hereinafter referred to as VSCode) is a lightweight and powerful Code editor for Windows, OSX and Linux. With built-in support for JavaScript, TypeScript, and node.js, and a rich plugin ecosystem that supports C++, C#, Python, PHP, and other languages, this seems to me to be the most useful editor on the front end.

And here we go…

1. Install a plug-in that recognizes vUE files

Search for Vetur in the plug-in library, click Install, click reload after installation, you can use itCopy the code

2. Create a new snippet

For MAC, the steps are as follows: code -> Preferences -> User code snippet -> (New code snippet named vue. JsonCopy the code

3. Write down the vue template you want to generate in vue.json

{
  "Print to console": {
    "prefix": "vue"."body": [
      "<! --The $1-- -- >"."<template>"."<div></div>"."</template>".""."<script>"."export default {"."data() {"."return {".""."}"."},"."// Lifecycle - creation complete (accessing the current this instance)"."created() {".""."},"."// Lifecycle - Mount complete (access to DOM element)"."mounted() {".""."}"."}"."</script>"."<style scoped>"."/* @import url(); Introducing CSS classes */"."$4"."</style>"]."description": "Log output to console"}}Copy the code

4. Paste the above code into vue.json as follows

Here is an explanation:"prefix": "vue", is the shortcut key, (vUE name can be modified at will) new VUE file, input vUE press the keyboard TAB to generate vUE templateCopy the code

VScode global search function

Recently I got to know the software VScode and started to try it out. The overall feeling is very good, but I cannot search globally. After understanding, IT is my configuration problem, and I found a solution online.

Add:

"Search. Exclude" : {" system/" :true, "! Ps/system / * /. * ":true},Copy the code

Now let’s test it out,

CTRL + Shift +F, start your show.

Vscode clicking import automatically jumps to the file

CTRL + mouse click

How does VSCode jump to a specified line

Reference: jingyan.baidu.com/article/3a2…

9 tips for using VSCode effectively

www.baidu.com/link?url=-7…