vsCode中配置setings.json的技巧
更新時間:2020年01月27日 10:04:41 作者:木易楊
本文給大家分享的是一個在vsCode中配置好的setings.json的樣例,可以給大家一個參考,有需要的小伙伴可以來看下
在前端開發(fā)中,有一個非常好用的工具,Visual Studio Code,簡稱VS code。都不用我安利VS code,大家就會乖乖的去用,無數(shù)個大言不慚的攻城獅,都被VS code比德芙還絲滑的強大功能所折服。
現(xiàn)在使用Vscode編碼的人越來越多,憑借著免費,開源,輕量,跨平臺的特點收貨了一大批忠實粉絲 最近因項目需要開始使用Vscode,因此做了一番研究,現(xiàn)在把個人的一些小經(jīng)驗分享給大家,首先我們來看看setings.json配置
{ "window.zoomLevel": 1, "vetur.format.defaultFormatter.html": "js-beautify-html", "editor.quickSuggestions": { "strings": true }, "fileheader.customMade": { //此為頭部注釋 "Description": "", "Autor": "wangDuJuan", "Date": "Do not edit" // "LastEditors": "liujun", // "LastEditTime": "Do not edit" }, "fileheader.cursorMode": { //此為函數(shù)注釋 "description": "", "param": "", "return": "", "author": "wangDuJuan" }, // 保存時自動格式化 "eslint.autoFixOnSave": true, // 用來配置作用的文件類型 "eslint.validate": [ "javascript", "javascriptreact", { "language": "html", "autoFix": true }, { "language": "vue", "autoFix": true } ], "beautify.config": { "indent_size": 4, //縮進大小,默認4 "indent_char": " ", //縮進字符,默認" " "css": { "indent_size": 2 }, "eol": "n", //end of line,行結(jié)尾字符"n" "indent_level": 0, //初始縮進級別 "indent_with_tabs": false, //使用tab縮進,將會覆蓋“indent_size”和“indent_char”設(shè)置,默認false "preserve_newlines": true, //保留空行,默認“true” "max_preserve_newlines": 10, //一次最多保留多少行的空行,默認10 "jslint_happy": false, //開啟jslint-stricter的嚴格模式(強制開啟“space_after_anon_function”選項),默認false "space_after_anon_function": false, //在匿名函數(shù)前自動加一個空格,比如function (){},默認false "brace_style": "collapse,preserve-inline", //括號風(fēng)格,"collapse-preserve-inline", "collapse", "expand", "end-expand", or "none" ,默認“collapse” "keep_array_indentation": false, //保持數(shù)組縮進,默認false "keep_function_indentation": false, //保持函數(shù)縮進,默認false "space_before_conditional": true, //在條件語句之前保留一個空格,默認true "break_chained_methods": false, //中斷多行間的鏈式方法調(diào)用,默認true "eval_code": false, "unescape_strings": false, //解碼用xNN編碼的可打印字符,默認false "wrap_line_length": 0, //Wrap lines at next opportunity after N characters. (Set zero to ignore wrapping),默認0,下次在n個字符后換行 "wrap_attributes": "auto", //將html屬性標簽放在新行“auto”,“force”,默認auto "wrap_attributes_indent_size": 4, //html屬性標簽新行縮進字符數(shù),默認為"indent_size"4 "end_with_newline": false //在文件結(jié)尾保證有換行,默認false }, "beautify.language": { "js": { "type": [ "javascript", "json", "typescript" ], "filename": [ ".jshintrc", ".jsbeautify" ] }, "css": [ "css", "scss", "sass" ], "html": [ "htm", "html", "vue" ] }, "[scss]": { }, "[typescript]": { }, "workbench.iconTheme": "vscode-icons", "editor.suggestSelection": "first", "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", "editor.codeActionsOnSave": { "source.fixAll.eslint": true }, "[vue]": { "editor.defaultFormatter": "HookyQR.beautify" } }
相關(guān)文章
完全卸載VSCode--解決卸載重新安裝后還有原來配置的問題(圖解)
這篇文章主要介紹了完全卸載VSCode--解決卸載重新安裝后還有原來配置的問題,本文給大家分享VSCode卸載不徹底的問題,需要的朋友可以參考下2020-04-04如何巧用vimdiff來替代原始的svn diff和git diff(效率提升)
這篇文章主要介紹了如何巧用vimdiff來替代原始的svn diff和git diff(效率提升),需要的朋友可以參考下2020-07-07