Restores the X server connection
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Restores the X server connection.
Display connection
- Target
:0- State
stale connection after display server restart
Command entered · ready to apply
Display connection
- Target
:0- State
stale connection after display server restart
Reinitializes the connection to the X11 server at :0, useful for a long-lived terminal Vim after that server restarts. No selection/clipboard content is copied.
Display connection
- Target
:0- State
reinitialized connection- v:clipmethod
updated for the restored display connection
Before & after
Before
Display connection
- Target
:0- State
stale connection after display server restart
After
Display connection
- Target
:0- State
reinitialized connection- v:clipmethod
updated for the restored display connection
Subject: :xrestore. Documentation-backed illustration; assumes terminal Vim compiled with +xterm_clipboard, running reachable compatible fixture X11 server at :0; successful simulated reconnect; not replay-verified. Reinitializes the connection to the X11 server at :0, useful for a long-lived terminal Vim after that server restarts. No selection/clipboard content is copied.
notesCursor on line 1, column 1Details & Vim help
Restores the X server connection. 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 :xr[estore] 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.