ReplaceFile : Replace Current File with new File
script karma |
Rating 4/1,
Downloaded by 896 |
Comments, bugs, improvements
|
Vim wiki
|
created by |
Jan Mollowitz |
|
script type |
utility |
|
description |
Life-changing utility for saving files under new names in Vim with automated clean up of the old file's buffer and hard disk version.
Usage:
Call the function by one of the methods below. Insert the desired new /optional/newpath/filename and press <Enter>.
The new file will be saved, a buffer for it will be opened, the old file's buffer closed and the old file deleted (if was written to disk).
Method 1 (preferred):
<leader>R
brings up the function call with the current file's full path.
Method 2:
:Repfile
will operate from Vim's CWD, not with the buffers directory.
Mapping:
The default mapping is:
<leader>R
If you want to change that, put
let g:RepCall="yourmapping"
in your vimrc.
Added BufKill support to be able to delete/unload/wipeout a buffer without loosing it's window.
Get BufKill here: vimscript#1147 (not neccessary, but really recommended)
|
|
install details |
Just put the repfile.vim in your .vim/plugin directory and restart vim! |
|
script versions (upload new version)
Click on the package to download.
ip used for rating: 3.139.78.149
|