Save file under another name
:saveas
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Save file under another name.
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three
Command entered · ready to apply
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three
Save file under another name
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three- saved.txt
changed alpha ↩ alpha two ↩ alpha three
Before & after
Before
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three
After
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three- saved.txt
changed alpha ↩ alpha two ↩ alpha three
Start in Normal mode. Saving writes only this example's temporary files. The Files panel shows the actual saved text.
Details & Vim help
Example replayed in Vim
Save file under another name. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :sav[eas] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.