Home > Article > Web Front-end > Common settings of vscode
About vscode
CPU100%
Sometimes, vscode will have a CPU utilization of 100%, and two rg.exe occupy all the CPU. The solution is as follows
File>Preferences>Settings, SearchSet "search.followSymlinks": false;
emmet
If you want to Use emmet to automatically complete the code in jsx. The solution is as follows
File>Preferences>Settings, make the following two settings
1. "emmet.triggerExpansionOnTab": true
2. "emmet.includeLanguages": {"javascript":"html"},
Automatic semicolon
Ifinstalled the prettier plug-in, when you paste the code or format the file, a semicolon will be added automatically and the double quotation marks will be changed into single quotation marks. This is determined by the default settings of the prettier plug-in. . The solution is as follows
File>Preferences>Settings, make the following two settings
1. "prettier.singleQuote": true
2. "prettier.semi ": false
beauty
When using vscode, beauty plug-ins are generally used to beautify the code. If you want to beautify the .vue code and automatically beautify the code when saving, you need to make the following settings
File>Preferences>Settings, make the following two settings
"editor.formatOnSave": true, "beautify.language": { "js": { "type": [ "javascript", "json" ], "filename": [ ".jshintrc", ".jsbeautify" ] }, "css": [ "css", "scss" ], "html": [ "htm", "html", "vue" ] }
Use beauty After beautifying the code, generally the code will meet the verification requirements of eslint. However, the two rules of prohibiting function from having a space before the parentheses (space-before-function-paren) and leaving a blank line at the end of the file (eol-last) are in beauty There is no corresponding matching rule in . If these two requirements are not mandatory, you can set them to 0
'eol-last': 0, 'space-before-function-paren': 0## in the .eslintrc file.
How to implement a custom mouse right-click menu in JS
Solution to the gap between the image and view tags
The above is the detailed content of Common settings of vscode. For more information, please follow other related articles on the PHP Chinese website!