【问题标题】:Indenting function braces in Eclipse在 Eclipse 中缩进函数大括号
【发布时间】:2018-01-26 01:12:22
【问题描述】:

我正在开发一个 C++ 项目并使用 Eclipse 作为 IDE。该项目的编码标准指定缩进函数的初始大括号和右大括号,如下所示:

int main()
  {
  return 0;
  }

Eclipse 4.3.1 中是否有自动缩进的选项?

【问题讨论】:

    标签: c++ eclipse autoformatting autoformat


    【解决方案1】:

    使用主菜单导航到窗口->首选项。

    在结果对话框中,将您的方式扩展到 C/C++->Code Style->Formatter。将 Active Profile 设置为 Whitesmiths 并根据口味进行编辑。

    例如,您似乎想将 Indentation 选项卡上的 Indentation size 和 Tab size 设置为 2。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-24
      • 2015-12-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多