there’s astyle. i’ve used that a bit in the past Dalton
On Wed, Jul 23, 2025 at 5:37 PM, Paul Wisehart <[p...@oldcode.org](mailto:On Wed, Jul 23, 2025 at 5:37 PM, Paul Wisehart <<a href=)> wrote: > On Wed, Jul 23, 2025 at 02:20:17PM -0600, Raymond, David wrote: >> I just use emacs formatting. It has formatters for most languages and I >> have used it on all three that you mention, Clang, Golang, and Python, as >> well as shell scripts. Maybe there are better formatters out there, but >> emacs formatters work fine for me. Of course, if you use vi (or some other >> editor) you are out of luck! > > Thanks!, Yes I should have mentioned I use vi. > I pipe the buffer to an external filter like gofmt, black, and/or indent. > I also like this because then you can use it in a commit-hook outside > of the editor. > > You can also do it in emacs with 'shell-command-on-region. > I have used emacs as a filter to indent lisp code, I suppose > I could do the same thing for C code... > > https://codeberg.org/pkw/emacs-scripts/src/branch/main/indent-filter.el > > -- > Paul Wisehart