Дана 25/07/23 04:00PM, Paul Wisehart написа:
> Do other OpenBSD C programmers use code formatters?
> What do they use?
> Should I just be more comfortable formatting my code
> as I type?
I find that none of the formatters I tried work 100% accurately for my
own personal code style. I tend to use clang-format with the
configuration file[1] which best describes my standard and iron out
corner cases using /* clang-format off */ comments.
I use vim to edit source code, and format code manually as I type. When
the code gets too messy, I just
:!clang-format -i %
the first time, or
:!
followed by arrow-up and Enter on subsequent invocations (persisting
across vim sessions) to tidy it up.
[1]: https://git.sr.ht/~strahinja/dotfiles/tree/master/item/.clang-format