tags:

views:

49

answers:

2

Hi,

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 subsequent write with the ":w" command will still write to the old location (e.g., C:).

Thanks, Derek

+5  A: 

You can specify a file name after :w:

:w /tmp/backup.txt
sth
+3  A: 

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

:w foo.txt
dreeves