1. 程式人生 > 程式設計 >VsCode中ctrl+s後會在當前目錄下自動生成dist目錄的方法

VsCode中ctrl+s後會在當前目錄下自動生成dist目錄的方法

VsCodectrl+s後會在當前目錄下自動生成dist目錄

後會在當前目錄下自動生成目錄

解決辦法:關閉compile-hero外掛

在設定中搜索compile-hero外掛

關閉所有自動生成dist目錄的選項(如下圖所示)

關閉外掛

PS:下面看下vue專案Ctrl+s vscode程式碼自動格式化

前言

多人開發vue專案,程式碼風格形式不一

vscode儲存程式碼,自動按照eslint規範格式化程式碼設定(vscode最新版配置)

vscode外掛

首先vscode需要裝一些vscode外掛

ESLint、Vetur、Prettier-Code formatter、GitLens-Git supercharged

配置settings.json

開啟settings.json,貼上配置,注意自己原有的vscode主題和字型等不要替換掉

開啟方式

方式一:

1)檔案 ------.>【首選項】---------->【設定】

2)搜尋emmet.include;

3)在settings.json下的【工作區設定】中新增

方式二:

Ctrl + P 搜尋settings.json

貼上如下配置

{
 "window.zoomLevel": 0,"diffEditor.ignoreTrimWhitespace": false,"workbench.colorTheme": "One Monokai","editor.fontSize": 14,"workbench.editor.enablePreview": true,//預覽模式關閉
 "editor.formatOnSave": true,// #每次儲存的時候自動格式化
 // 自動修復
 "editor.codeActionsOnSave": {
  "source.fixAll.eslint": true,},"eslint.enable": true,//是否開啟vscode的eslint
 // vscode預設啟用了根據檔案型別自動設定tabsize的選項
 "editor.detectIndentation": false,// 重新設定tabsize
 "editor.tabSize": 2,// #去掉程式碼結尾的分號 
 "prettier.semi": false,// #使用單引號替代雙引號 
 "prettier.singleQuote": true,// #讓prettier使用eslint的程式碼格式進行校驗 
 "prettier.eslintIntegration": true,"javascript.preferences.quoteStyle": "double","typescript.preferences.quoteStyle": "double",// #讓函式(名)和後面的括號之間加個空格
 "javascript.format.insertSpaceBeforeFunctionPare

到此這篇關於VsCode中ctrl+s後會在當前目錄下自動生成dist目錄的方法的文章就介紹到這了,更多相關VsCode當前目錄下自動生成dist目錄內容請搜尋我們以前的文章或繼續瀏覽下面的相關文章希望大家以後多多支援我們!