Batch-rename files using Vim
vimv is a terminal-based file rename utility that lets you easily mass-rename files using Vim.
curl https://raw.githubusercontent.com/thameera/vimv/master/vimv > ~/bin/vimv && chmod +755 ~/bin/vimv
sudo PREFIX=/usr/local make install
Or simply copy the
vimvfile to a location in your
$PATHand make it executable.
vimvwith optionally, a list of files to rename.
$EDITORenvironment variable set, vimv will use its value by default.
git mv(instead of
mv) to rename the files.
/some/path/filenameformat to move the file elsewhere during renaming. If the path is non-existent, it will be automatically created before moving.
Don't delete or swap the lines while in Vim or things will get ugly.