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
精彩评论