Vim Recall繁體中文

Restores the X server connection

:xrestore

Example

Normal 0 / 2

Restores the X server connection.

Display connection

Target
:0
State
stale connection after display server restart
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.

Sample buffer
notes
Cursor on line 1, column 1
Details & 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.