]> Sergey Matveev's repositories - dotfiles.git/commitdiff
cfmt.sh is back
authorSergey Matveev <stargrave@stargrave.org>
Wed, 22 Apr 2020 12:11:27 +0000 (15:11 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 22 Apr 2020 13:25:01 +0000 (16:25 +0300)
bin/bin/cfmt.sh [new file with mode: 0755]
clang-format/.clang-format
vim/.vim/ftplugin/c/autos.vim

diff --git a/bin/bin/cfmt.sh b/bin/bin/cfmt.sh
new file mode 100755 (executable)
index 0000000..5cf5c4c
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+clang-format60 -style="`cat ~/.clang-format`" $@
index 2c6edf9ccb2171acb2eea8dc72ed694822b38f43..4e0d79461a149ff7458f5d1b8fab6451ea9e99b8 100644 (file)
@@ -1,16 +1,17 @@
-BasedOnStyle: llvm
-ColumnLimit: 88
-IndentWidth: 4
-AlignAfterOpenBracket: AlwaysBreak
-AlignConsecutiveAssignments: true
-AllowAllParametersOfDeclarationOnNextLine: false
-AllowShortBlocksOnASingleLine: true
-AllowShortCaseLabelsOnASingleLine: true
-BinPackArguments: false
-BinPackParameters: false
-BreakBeforeTernaryOperators: false
-BreakStringLiterals: false
-
-BreakBeforeBraces: Custom
-BraceWrapping:
-    AfterFunction: true
+{
+    BasedOnStyle: llvm,
+    ColumnLimit: 88,
+    IndentWidth: 4,
+    AlignAfterOpenBracket: AlwaysBreak,
+    AlignConsecutiveAssignments: true,
+    AllowAllParametersOfDeclarationOnNextLine: false,
+    AllowShortBlocksOnASingleLine: true,
+    BinPackArguments: false,
+    BinPackParameters: false,
+    BreakBeforeTernaryOperators: false,
+    BreakStringLiterals: false,
+    BreakBeforeBraces: Custom,
+    BraceWrapping: {
+        AfterFunction: true,
+    },
+}
index b0f7c2d6b407578da08a84cbb75950d223836402..1eb3aaed71ea2ef8f7221471f0bd0c6846f02390 100644 (file)
@@ -1,3 +1,3 @@
-setlocal equalprg=clang-format60
+setlocal equalprg=cfmt.sh
 setlocal commentstring=//\ %s
 command! -buffer Fmt normal mtgg=G'tz.