Git branch of http://www.vim.org/scripts/script.php?script_id=1928
Copyright June 2007 by Christian J. Robinson (infynity@onewest.net).
Updated August 2011 by Dan Rogers (dan@danro.net).
Updated February 2012 with fixes by Andrew Raw, added by Henrik Nyh.
Distributed under the terms of the Vim license. See ":help license".
Give the current file a new name in the same directory:
:Rename bar.txt
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:
:Rename /tmp/bar.txt
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.