Vim Recall繁體中文

Get or set window position

:winpos

Example

Normal 0 / 2

Get or set window position.

GUI geometry

Top-left corner
20, 20 pixels
Before & after

Before

GUI geometry

Top-left corner
20, 20 pixels

After

GUI geometry

Top-left corner
120, 80 pixels

Subject: :winpos. Documentation-backed illustration; assumes GUI/window manager supporting :winpos and enough screen space to honor the requested coordinates; not replay-verified. Requests the GUI window's top-left position at x=120, y=80 pixels. This command is unsupported by some GUI/window-manager combinations.

Sample buffer
notes
Cursor on line 1, column 1
Details & Vim help

Get or set window position. 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 :winp[os] 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.