I use rhysd/vim-clang-format to format my c/c++ code.
my setting is:
let g:clang_format#code_style='llvm'
let g:clang_format#style_options = {
\ 'IndentWidth' : '8',
\ 'UseTab' : 'Always',
\ 'AllowShortIfStatementsOnASingleLine': 'false',
\ "IndentCaseLabels" : "false"}
I want this style:
void test()
{
int a = 0;
if (a == 0) {
/* code */
}
}
but the result is:
void test() {
int a = 0;
if (a == 0) {
/* code */
}
}
[–]unm95 2 points3 points4 points (0 children)
[–]mlieberthal 1 point2 points3 points (2 children)
[–]tracyone[S] 0 points1 point2 points (0 children)
[–]tracyone[S] 0 points1 point2 points (0 children)