Install ClangFormat via your platform's package manager. On windows, download the installer and Visual Studio plugin from LLVM.
Download the .clang-format
file from this Gist and save it to the root directory of your Cinder repo.
clang-format -i -style=file [<file> ...]
Download the Clang Format plugin from Package Control (or manually).
Run the Clang Format: Select Style
command and choose File
. This will instruct clang-format to search up the directory tree and use the first .clang-format file it finds.
Select a few lines of source code and run Clang Format: Format Selection
.
Check out ClangFormat-Xcode.
These are things that differ from Cinder's code style but cannot be specified in ClangFormat.
- A space is not inserted after the
!
boolean operator. - Cinder has no enforced maximum line length, so array declarations tend to stay on one line.
If you find a place where this file fails to match Cinder's coding style, please fork this Gist and leave a comment!
thanks Ryan!