How to use ClangFormat with Cinder
Install ClangFormat via your platform's package manager. On windows, download the installer and Visual Studio plugin from LLVM.
.clang-format file from this Gist and save it to the root directory of your Cinder repo.
Format whole files from Terminal
clang-format -i -style=file [<file> ...]
From Sublime Text 3
Download the Clang Format plugin from Package Control (or manually).
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
- 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!