我的 Visual Studio Code 設定
settings.json
{
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"workbench.settings.openDefaultSettings": true,
"javascript.validate.enable": false, //for Extension "StandardJS - JavaScript Standard Style"
"javascript.format.insertSpaceBeforeFunctionParenthesis": true, // 宣告函式時,函式名稱和 () 之間有一格空格
"editor.detectIndentation": false, // 儲存檔案時,讓 autoformat 縮排是兩格
"diffEditor.ignoreTrimWhitespace": false, // 儲存檔案時,讓 autoformat 縮排是兩格
"emmet.includeLanguages": {
"javascript": "html",
},
"vetur.format.defaultFormatter.html": "js-beautify-html", // format .vue html
"vetur.format.defaultFormatter.js": "vscode-typescript", // Let the js in vue formatted according to the ts format of the editor
"[python]": {
"editor.detectIndentation" : false,
"editor.insertSpaces": true,
"editor.tabSize": 4
}
}
Extension
- Emmet
- Bracket Pair Colorizer 2 0.2.0
- Live Server 5.6.1
- Markdown Preview Enhanced 0.5.13
- StandardJS - JavaScript Standard Style 1.4.0
- Vetur
- EditorConfig for VS Code
- EditorConfigGenerator
- Python
- Code Runner:執行被反白的程式碼
- indent-rainbow:不同層次的縮排標示不同顏色
參考資料
- VSCode autoformat going to 2 spaces instead of 4
- Vue Eslint auto fix in Vscode
- How to set up Visual Studio Code for Python development
最後更新日期:2021 年 07 月 06 日
Comments
Post a Comment