【问题标题】:How can I get clang-format to change only indent width?如何让 clang-format 仅更改缩进宽度?
【发布时间】:2015-10-29 11:54:38
【问题描述】:

我有一个大型代码库,我想为其标准化缩进宽度。 如何在不进行其他更改的情况下使用 clang-format 执行此操作?

-style='{IndentWidth: 2}' 传递给 clang 格式

按照-dump-config 的暗示对源文件进行其他更改。

【问题讨论】:

    标签: clang-format


    【解决方案1】:

    clang-format 根本不支持。通过设置“ColumnLimit: 0”,您可能会更接近这一点,这将使 clang-format 在一定程度上接受现有的换行符。

    【讨论】:

      猜你喜欢
      • 2022-10-18
      • 1970-01-01
      • 1970-01-01
      • 2021-06-12
      • 1970-01-01
      • 2015-09-29
      • 1970-01-01
      • 2015-05-25
      • 2011-05-09
      相关资源
      最近更新 更多