xaizek / dotvim (License: Unspecified) (since 2018-12-07)
Vim configuration and plugins.
Commit bb412bf0097e5d3f33386826ab7f4ff9de8a1ab5

Update Rename plugin
Author: xaizek
Author date (UTC): 2023-03-18 18:47
Committer name: xaizek
Committer date (UTC): 2023-03-18 18:47
Parent(s): c504d25a8b958104cb5062d0a41d91c9a00b0cb2
Signing key: 99DC5E4DB05F6BE2
Tree: 3f7ed44b2b6ec68afafe877400d09d96cf750f29
File Lines added Lines deleted
pack/other/start/rename/plugin/Rename.vim 3 3
File pack/other/start/rename/plugin/Rename.vim changed (mode: 100644) (index 819dccd..cc81c71)
1 1 " Rename.vim - Rename a buffer within Vim and on the disk " Rename.vim - Rename a buffer within Vim and on the disk
2 2 " "
3 " Copyright June 2007-2011 by Christian J. Robinson <heptite@gmail.com>
3 " Copyright June 2007-2021 by Christian J. Robinson <heptite@gmail.com>
4 4 " "
5 5 " Distributed under the terms of the Vim license. See ":help license". " Distributed under the terms of the Vim license. See ":help license".
6 6 " "
 
8 8 " "
9 9 " :Rename[!] {newname} " :Rename[!] {newname}
10 10
11 command! -nargs=* -complete=file -bang Rename call Rename(<q-args>, '<bang>')
11 command! -nargs=1 -complete=file -bang Rename call Rename(<q-args>, '<bang>')
12 12
13 13 function! Rename(name, bang) function! Rename(name, bang)
14 14 let l:name = a:name let l:name = a:name
 
... ... function! Rename(name, bang)
28 28 let l:status = 1 let l:status = 1
29 29
30 30 let v:errmsg = '' let v:errmsg = ''
31 silent! exe 'saveas' . a:bang . ' ' . l:name
31 silent! exe 'silent! saveas' . a:bang . ' ' . l:name
32 32
33 33 if v:errmsg =~# '^$\|^E329' if v:errmsg =~# '^$\|^E329'
34 34 let l:lastbufnr = bufnr('$') let l:lastbufnr = bufnr('$')
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotvim

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotvim

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master