I use the following command in vim to batch auto-format a specific filetype:
:args ~/someDirectory/**/*.filetype | argdo execute "normal gg=G" | update
I am trying to figure out how I would run this command as a pre-commit hook to ensure all files of the filetype I care about are auto-formatted before being committed.
How would I accomplish this?
Thanks in advance.