开发者

Copy current document to another location in V/Vim

开发者 https://www.devze.com 2022-12-25 22:29 出处:网络
Im wondering if there is a command in V/Vim that will save a backup of the current document to another location (e.g., from C:\\ to C:\\backup). Any subsequ开发者_C百科ent write with the \":w\" comman

Im wondering if there is a command in V/Vim that will save a backup of the current document to another location (e.g., from C:\ to C:\backup). Any subsequ开发者_C百科ent write with the ":w" command will still write to the old location (e.g., C:).

Thanks, Derek


You can specify a file name after :w:

:w /tmp/backup.txt


The following will write a copy of the current file being edited to foo.txt:

:w foo.txt
0

精彩评论

暂无评论...
验证码 换一张
取 消