In vim, gg=G
does a great job re-indenting your current file and I'd like to do that on several files.
I would like to do something like this:
files=`find $1 -type f`
for file in $files
do
vim -e -s -n "+gg=G|wq" $file
done
The problem is that gg=G
is not a command (if you type :gg=G
in vim, it throws an error), so it doesn't work...