0
(我已經發布了這個問題https://codereview.stackexchange.com/,標誌着偏離主題。主持人建議在SO張貼問題)如何使用`indent`程序在Linux
我使用indent
我糾正命名塊縮進糾正縮進。一切都很好,除了名稱空間塊中的縮進。
我有樣本代碼:
$ cat test2.cc
#include <iostream>
namespace API
{
void f()
{
std::cout << "f() called" << std::endl;
}
}
但運行indent
後,我得到了:
$ indent -st -bl -bli0 -i 4 -c 4 -kr -nce -bls test2.cc
#include <iostream>
namespace API
{
void f()
^^^^<=== I don't want these indentation
{
std::cout << "f() called" << std::endl;
}
}
我不想命名塊和硬的第一縮進找到任何相關的縮進選項(這是非常複雜)。我如何解決這個問題?任何建議,將不勝感激。
謝謝你的建議。我會檢查'clang-format'。 –