【问题标题】:Cannot change the indentation of project files in Intellij?无法更改 Intellij 中项目文件的缩进?
【发布时间】:2016-02-11 20:17:26
【问题描述】:

我想将所有项目中所有文件的缩进更改为 2 个空格。我的项目中没有.editoconfig。即使有,我也禁用了它的覆盖。我在ProjectDefault 级别格式化程序中进行了相同的更改。

Tab sizeIndentContinuation Indent 的大小为 2 个空格。

但每当我在新文件中按 Enter 键时,我都会得到一个 4 空格制表符和 4 个空格缩进。

【问题讨论】:

    标签: intellij-idea indentation


    【解决方案1】:

    我建议使用.editorconfig,只要确保您安装了plugin。如果没有,首先检查Editor -> Code Style 以获取默认选项,然后检查Editor -> Code Style -> Java (for instance) 以获取该文件类型的特定选项。为文件类型指定的任何选项都将覆盖默认值。

    【讨论】:

      猜你喜欢
      • 2019-01-06
      • 1970-01-01
      • 1970-01-01
      • 2019-09-18
      • 1970-01-01
      • 1970-01-01
      • 2011-06-03
      • 1970-01-01
      • 2013-03-08
      相关资源
      最近更新 更多