vscode editorconfig

使用 EditorConfig 建立可攜式自訂編輯器設定

https://editorconfig.org/ http://www.alloyteam.com/2014/12/editor-config/

新增、編輯、移除 EditorConfig 檔案

  • 新增移除編輯設定檔後,都須關閉重啟檔案才會生效。
  • 執行「格式化文件」可套用到現有檔案
  • 檔案中新增root=true 屬性確保不會被高層級污染

將 EditorConfig 檔案新增至專案或程式碼基底, 不會將「現有樣式」轉換為新的樣式; 新的程式碼文件,才會依照 EditorConfig 檔案設定格式。

可執行「設定文件的格式」使 EditorConfig 會套用到現有的程式碼: ([編輯] > [進階] > [格式化文件] 或 Ctrl+K、Ctrl+D)。

如果移除了 EditorConfig 檔案, 須「關閉並重新開啟」任何「開啟的」程式碼檔案, 以還原為新程式碼的全域編輯器設定。

確保「不套用」任何較高層級 .editorconfig 的設定, 請在較低層級的 .editorconfig 檔案中新增 root=true 屬性。

編輯 EditorConfig 檔案後, 須重新載入程式碼檔,新的設定才會生效。

results for ""

    No results matching ""