This came from the help inside vim.
Renaming files *rename-files*
Say I have a directory with the following files in them (directory picked at
and I want to rename *.c *.bla. I'd do it like this: >
:r !ls *.c
:%s/\(.*\).c/mv & \1.bla
You invoke the help within vim by entering the colon then typing help.