How to use vim to indent all files in a directory

run vim script indentme.scr to indent all files using vim

# find . -type f -name '*.c' -exec vim -s indentme.scr "{}" \;

[indentme.scr file shall contain vim commands like:
gg=G]

(gg means go to first line
= means auto indent
G means till the last line)

No comments: