[英]How to tell auto-format in VS Code not to insert spaces after opening and before closing curly braces?
[英]Does vscode support removing spaces after opening and before closing curly braces now?
碼:
const a = {a: 'b'};
然后格式化:
const a = { a: 'b' };
vscode是否支持現在打開和關閉大括號之前刪除空格?
更新的答案以獲取更新的vscode版本
從VSCode 1.13開始,您可以通過設置禁用自動空間插入:
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false
要么
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false
原始答案
我致力於VSCode的JavaScript和TypeScript支持。
從VSCode 1.9開始,我們沒有公開在花括號前后設置空格格式的設置。 我們正在跟蹤對此格式的支持,一旦TypeScript公開了對它的支持,我們將選擇該格式選項
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.