clang-format is a great tool but yet some features are still missing for many years.
This project helps you to format #pragma omp
, #pragma unroll
, etc. with the right indent.
The name of this project comes from patched clang-format. There are many usages brought by this script binary to help patch the formating rules of clang-format.
- Use it the way you use
clang-format
- You can also run with env var to replace any pragma
REPLACE_ANY_PRAGMA=1 ./p-clang-format ...
If you are interested in how this works or how to add this capability to your vim script, please refer to this blog
Simply copy this binary to any folder listed in $PATH
or /usr/bin/
.
MIT License.