From 0ff46dad47d0042860b2a2e1a1816363ff556ff7 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 2 Apr 2020 16:36:23 +0300 Subject: [PATCH] More C formatting --- bin/bin/cfmt.sh | 9 ++++++++- vim/.vim/ftplugin/c/autos.vim | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/bin/cfmt.sh b/bin/bin/cfmt.sh index 09d8560..8049666 100755 --- a/bin/bin/cfmt.sh +++ b/bin/bin/cfmt.sh @@ -1,3 +1,10 @@ #!/bin/sh -clang-format60 -style="{BasedOnStyle: llvm, IndentWidth: 4}" $@ +clang-format60 -style="{ + BasedOnStyle: llvm, + IndentWidth: 4, + AllowAllParametersOfDeclarationOnNextLine: false, + BinPackArguments: false, + BinPackParameters: false, + AllowAllParametersOfDeclarationOnNextLine: false, +}" $@ diff --git a/vim/.vim/ftplugin/c/autos.vim b/vim/.vim/ftplugin/c/autos.vim index d211fd1..1eb3aae 100644 --- a/vim/.vim/ftplugin/c/autos.vim +++ b/vim/.vim/ftplugin/c/autos.vim @@ -1,2 +1,3 @@ setlocal equalprg=cfmt.sh +setlocal commentstring=//\ %s command! -buffer Fmt normal mtgg=G'tz. -- 2.44.0