From 632e75d9a824eb0f31229615af4a77d8cd68da47 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 11 Apr 2022 11:22:30 +0300 Subject: [PATCH] Do not align on assignments in C-code --- clang-format/.clang-format | 2 +- vim/.vim/ftplugin/c/autos.vim | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clang-format/.clang-format b/clang-format/.clang-format index 6e2f208..6499a21 100644 --- a/clang-format/.clang-format +++ b/clang-format/.clang-format @@ -3,7 +3,7 @@ ColumnLimit: 88, IndentWidth: 4, AlignAfterOpenBracket: AlwaysBreak, - AlignConsecutiveAssignments: true, + AlignConsecutiveAssignments: false, AllowAllParametersOfDeclarationOnNextLine: false, AllowShortBlocksOnASingleLine: true, AlwaysBreakAfterReturnType: TopLevel, diff --git a/vim/.vim/ftplugin/c/autos.vim b/vim/.vim/ftplugin/c/autos.vim index 5f264f3..8de23f6 100644 --- a/vim/.vim/ftplugin/c/autos.vim +++ b/vim/.vim/ftplugin/c/autos.vim @@ -4,6 +4,8 @@ abbreviate UCC unsigned char abbreviate u8 uint8_t * abbreviate U8 (uint8_t *) let @e = "ywoassert(pA!= NULL);" +nmap [cl O// clang-format off +nmap ]cl o// clang-format on setlocal equalprg=cfmt.sh command! -buffer Fmt normal mtgg=G'tz. -- 2.44.0