@bmaddy There's also https://github.com/clj-commons/rewrite-clj as a non-emacs option
Thanks for the suggestion. I'd looked into this but it seemed like a lot of work for such a simple edit. I ended up adding the newline with sed
and then manually indenting each file.
@bmaddy whenever I need to get some tiny in-buffer manipulations with clojure structures I'd use jet
, babashka
or zprint
, e.g.: with <C-u |> - shell-command-on-region
:
zprint '{:map {:comma? false :justify? true}}'
straightens up a map, removes commas and aligns things nicelyI ended up adding the newline with sed
and then manually indenting each file. Reformatting all of our files would have resulted in too many changes and merge conflicts in this case. I appreciate the suggestion though!