2017-02-08 39 views
2

我想配置vscode以使用2個縮進空格格式化我的JSON對象,而不是4個,因爲它默認爲。我怎樣才能做到這一點?配置vscode json格式化空間

+1

見http://stackoverflow.com/a/42118981/2631715 - 而不是'[巨蟒]'你應該能夠使用'[JSON]'。 – Gama11

+0

謝謝。看起來像JSON受到http://stackoverflow.com/a/42118981/6139071中所述的相同限制 –

回答

0

粘貼:

ext install EditorConfig 

.editorconfig文件添加到項目根有以下:

[*.json] 
indent_style = space 
indent_size = 2 

也見。 json在VSCode中,重新所有設置:

"[json]": { 
"editor.insertSpaces": true, 
"editor.tabSize": 2 
}