I have a BufWritePre hook, which unfortunately doesn't work with :wa, only with :w (and also with :wq).
How can I make it work with :wa as well?
This is a hook I have in my .vimrc: autocmd BufWritePre *.c* :ClangFormat
BufWritePre are run only when the buffers are actually written.  :w forces write, while :wall doesn't, it only writes those buffers that are modified.  If you want to force writing all buffers (modified or not) you can do something like :bufdo w.  This will also run BufWritePre and friends.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With