diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-12-27 15:36:29 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-12-27 15:36:29 -0200 |
commit | e573a7090239d4b5cdc0e2e1053433f6341fdba2 (patch) | |
tree | e53f5164bb3c37dcf8d2959e06b6e2b722170af0 /modules/vim/vim.dot.link/plugin/Rename.vim | |
parent | adce46f27ce9cd659581153ed7264dbabdc06c19 (diff) | |
download | dotfiles-e573a7090239d4b5cdc0e2e1053433f6341fdba2.tar.gz dotfiles-e573a7090239d4b5cdc0e2e1053433f6341fdba2.tar.bz2 |
Removing vim to convert it to a submodule
Diffstat (limited to 'modules/vim/vim.dot.link/plugin/Rename.vim')
-rw-r--r-- | modules/vim/vim.dot.link/plugin/Rename.vim | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/modules/vim/vim.dot.link/plugin/Rename.vim b/modules/vim/vim.dot.link/plugin/Rename.vim deleted file mode 100644 index b56c516..0000000 --- a/modules/vim/vim.dot.link/plugin/Rename.vim +++ /dev/null @@ -1,27 +0,0 @@ -" Rename.vim - Rename a buffer within Vim and on the disk -" -" Copyright June 2007 by Christian J. Robinson <infynity@onewest.net> -" -" Distributed under the terms of the Vim license. See ":help license". -" -" Usage: -" -" :Rename[!] {newname} - -command! -nargs=* -complete=file -bang Rename :call Rename("<args>", "<bang>") - -function! Rename(name, bang) - let l:curfile = expand("%:p") - let v:errmsg = "" - silent! exe "saveas" . a:bang . " " . a:name - if v:errmsg =~# '^$\|^E329' - if expand("%:p") !=# l:curfile && filewritable(expand("%:p")) - silent exe "bwipe! " . l:curfile - if delete(l:curfile) - echoerr "Could not delete " . l:curfile - endif - endif - else - echoerr v:errmsg - endif -endfunction |