Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze vue save automatic formatting line feeds

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to analyze vue to save automatic formatting and line wrapping, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

It is useless to find a lot of ways to change it on the Internet. After seeing it from a boss, I took it off. If the font is still comfortable with the original system, you can add it yourself, and if you need to change it, you can modify it by yourself. In the upper right-hand corner file-- preferences-- Settings-- search setting--- for editing in setting.json, delete other comments, and replace the following code block. Font size and line height can be modified by yourself

{/ / set the text size "editor.fontSize": 18, / / set the text line height "editor.lineHeight": 20, / / open the line count prompt "editor.lineNumbers": "on", / / display a small panel with parameter document and type information when typing. "editor.parameterHints.enabled": true, / / adjust the zoom level of the window "window.zoomLevel": 0, / / file directory / / "workbench.iconTheme": "vscode-icons", / / set the font "editor.fontFamily": "Consolas','Droid Sans Mono', 'Courier New', monospace,' Droid Sans Fallback'", / / automatic line wrapping "editor.wordWrap": "on" / / Custom vscode panel color "workbench.colorCustomizations": {/ / "tab.activeBackground": "# 253046", / / background color of the active tab / / "activityBar.background": "# 253046", / / active bar background color / / "sideBar.background": "# 253046", / / side bar background color / / "activityBar.foreground": "# 23f8c8" / / activity bar foreground color (for example, for icons) "editor.background": "# 292a2c" / / Editor background color}, / / vscode enables the option to automatically set tabsize based on file type "editor.detectIndentation": false, / / reset tabsize "editor.tabSize": 2, / / # automatically format "editor.formatOnSave": true every time you save / / # Let the function (name) and the following parentheses add a space "javascript.format.insertSpaceBeforeFunctionParenthesis": true, / / # this according to the user's own custom to choose "vetur.format.defaultFormatter.html": "js-beautify-html", / / # Let the js in vue format "vetur.format.defaultFormatter.js": "vscode-typescript" according to the editor's own ts format, / / save the ESLint operation type of the code to run. "editor.codeActionsOnSave": {"source.fixAll.eslint": true}, / / add emmet support vue file "emmet.includeLanguages": {"wxml": "html", "vue": "html"}, / / whether to wrap the line "minapp-vscode.disableAutoConfig": true, / / Quick Preview (right) "editor.minimap.enabled": true in the two selectors / / tab code completion "files.associations": {"* .wpy": "vue", "* .vue": "vue", "* .cjson": "jsonc", "* .wxss": "css", "* .wxs": "javascript"}, / / to configure how to start ESLint using the ESLint CLI engine API. The default is the empty option "eslint.options": {"extensions": [".js", ".vue"]}, / / execute linter when onSave or onType. The default is onType. "eslint.run": "onSave", / / enables ESLint as a formatter for authenticated files. "eslint.format.enable": an array of true, / / language identifiers, for which the ESLint extension should be activated and an attempt should be made to validate the file. "eslint.probe": ["javascript", "javascriptreact", "vue-html", "vue", "html"], / / closing the use of cnpm by the rg.exe process results in a high rg.exe footprint "search.followSymlinks": false, / / setting the js-beautify-html property to partition "vetur.format.defaultFormatterOptions": {"js-beautify-html": {"wrap_attributes": "auto" "wrap_line_length": 200, "end_with_newline": false}, "prettyhtml": {"printWidth": 200, "singleQuote": false, "wrapAttributes": false, "sortAttributes": false}, "prettier": {"semi": false, "singleQuote": true}, / / style defaults to an indent "vetur.format.styleInitialIndent": true / / White space handling after the function keyword that defines an anonymous function. "javascript.format.insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, / / defines how spaces are handled before parentheses in function arguments. "typescript.format.insertSpaceBeforeFunctionParenthesis": true, / / new version message "vsicons.dontShowNewVersionMessage": true, / / controls whether the resource manager confirms when deleting files to the wastebasket. "explorer.confirmDelete": true, / / use vue-html "vetur.validation.template" in eslint-plugin-vue validation: false, / / specify the color theme to be used in the workbench. / / "workbench.colorTheme": "One Dark Pro"} on how to analyze vue save automatic formatting line feeds to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report