Set the window size in character columns and rows
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Set the window size in character columns and rows.
GUI geometry
- Text grid
80 columns × 24 rows
Command entered · ready to apply
GUI geometry
- Text grid
80 columns × 24 rows
Requests a 100-column, 30-row GUI text grid. :winsize is obsolete; :set lines=30 columns=100 states the dimensions more clearly.
GUI geometry
- Text grid
100 columns × 30 rows
Before & after
Before
GUI geometry
- Text grid
80 columns × 24 rows
After
GUI geometry
- Text grid
100 columns × 30 rows
Subject: :winsize. Documentation-backed illustration; assumes GUI supporting window resize, enough screen space and no window-manager adjustment; not replay-verified. Requests a 100-column, 30-row GUI text grid. :winsize is obsolete; :set lines=30 columns=100 states the dimensions more clearly.
notesCursor on line 1, column 1Details & Vim help
Set the window size in character columns and rows. 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 :wi[nsize] 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. Both width and height numbers are required; there is no no-argument query. This command is obsolete; prefer :set columns=100 lines=30 for explicit dimension names.