Skip to content

Commit

Permalink
Add .clang-format and .vimrc files for automatically code formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ursg committed Feb 2, 2021
1 parent e2f143b commit 436191c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
BasedOnStyle: LLVM
UseTab: Never
IndentWidth: 3
TabWidth: 3
BreakBeforeBraces: Attach
PointerAlignment: Left
AlignAfterOpenBracket: true
AllowShortIfStatementsOnASingleLine: false
IndentCaseLabels: false
ColumnLimit: 120
AccessModifierOffset: -3
...

6 changes: 6 additions & 0 deletions .vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set cindent
set shiftwidth=3
set tabstop=3
set expandtab

set equalprg=clang-format\ -style=file

0 comments on commit 436191c

Please sign in to comment.