Save to viminfo file
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2notesCursor on line 1, column 1notesCursor on line 1, column 1notesCursor on line 1, column 1Save to viminfo file.
Vim registers
aRegister a- Characterwise
saved
Current session information
- File mark
/demo/notes.txt at line 3- viminfo
'100,<50,s10
Files
- recall.viminfo
absent
Command entered · ready to apply
Vim registers
aRegister a- Characterwise
saved
Current session information
- File mark
/demo/notes.txt at line 3- viminfo
'100,<50,s10
Files
- recall.viminfo
absent
Writes current registers and file marks according to viminfo options. ! writes only the internal information instead of merging older saved information.
Vim registers
aRegister a- Characterwise
saved
Current session information
- File mark
/demo/notes.txt at line 3- viminfo
'100,<50,s10
Files
- recall.viminfo
written: register a=saved; file marks include notes.txt line 3
Before & after
notesCursor on line 1, column 1Vim registers
aRegister a- Characterwise
saved
Current session information
- File mark
/demo/notes.txt at line 3- viminfo
'100,<50,s10
Files
- recall.viminfo
absent
notesCursor on line 1, column 1Vim registers
aRegister a- Characterwise
saved
Current session information
- File mark
/demo/notes.txt at line 3- viminfo
'100,<50,s10
Files
- recall.viminfo
written: register a=saved; file marks include notes.txt line 3
Subject: :wviminfo. Documentation-backed illustration; assumes +viminfo, viminfofile is not NONE, shown viminfo option and writable fixture file; not replay-verified. Writes current registers and file marks according to viminfo options. ! writes only the internal information instead of merging older saved information.
Details & Vim help
Save to viminfo file. 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 :wv[iminfo] 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.