配置 vscode json 格式化空间 [英] Configure vscode json formatting spaces

查看:62
本文介绍了配置 vscode json 格式化空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将 vscode 配置为使用 2 个缩进空格来格式化我的 JSON 对象,而不是默认情况下的 4 个空格.我该怎么做?

I would like to configure the vscode to format my JSON objects with 2 spaces of indent, not 4 as it does by default. How can I do this?

推荐答案

在 VSCode 的 settings.json 中粘贴这一行,你就大功告成了:

Paste in this lines in settings.json in VSCode, and you're all set:

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

这篇关于配置 vscode json 格式化空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆