Git branch of http://www.vim.org/scripts/script.php?script_id=1928
rename.vim - Rename a buffer within Vim and on the disk
Copyright June 2007 by Christian J. Robinson (firstname.lastname@example.org).
Updated August 2011 by Dan Rogers (email@example.com).
Distributed under the terms of the Vim license. See ":help license".
Give the current file a new name in the same directory:
Give the current file a new name in a directory relative to the working directory:
:Rename sub/bar.txt :Rename ../sibling/bar.txt
Give the current file a new name in an absolute directory:
Add a bang to create the directories if they don't exist:
:Rename create/these/dirs/bar.txt! :Rename! create/these/dirs/bar.txt
The bang is required so typos don't create unintended directories.