Use the horizontal command modifier
Example
Normal 0 / 2Command-line 1 / 2Normal 2 / 2Use the horizontal command modifier.
Windows
- Window 3 · alpha.txt Active
40 columns × 11 lines- Window 4 · alpha.txt
39 columns × 11 lines
- Window 2 · alpha.txt
40 columns × 10 lines- Window 1 · alpha.txt
39 columns × 10 lines
Tab pages
- Tab 1 Active
alpha.txt, alpha.txt, alpha.txt, alpha.txt
Option · number
- Local number
0- Global number
0
Command entered · ready to apply
Windows
- Window 3 · alpha.txt Active
40 columns × 11 lines- Window 4 · alpha.txt
39 columns × 11 lines
- Window 2 · alpha.txt
40 columns × 10 lines- Window 1 · alpha.txt
39 columns × 10 lines
Tab pages
- Tab 1 Active
alpha.txt, alpha.txt, alpha.txt, alpha.txt
Option · number
- Local number
0- Global number
0
Command applied
Windows
- Window 5 · alpha.txt Active
40 columns × 7 lines- Window 4 · alpha.txt
39 columns × 11 lines
- Window 3 · alpha.txt
40 columns × 7 lines
- Window 1 · alpha.txt
39 columns × 10 lines
- Window 2 · alpha.txt
40 columns × 6 lines
Tab pages
- Tab 1 Active
alpha.txt, alpha.txt, alpha.txt, alpha.txt, alpha.txt
Option · number
- Local number
0- Global number
0
Before & after
Before
Windows
- Window 3 · alpha.txt Active
40 columns × 11 lines- Window 4 · alpha.txt
39 columns × 11 lines
- Window 2 · alpha.txt
40 columns × 10 lines- Window 1 · alpha.txt
39 columns × 10 lines
Tab pages
- Tab 1 Active
alpha.txt, alpha.txt, alpha.txt, alpha.txt
Option · number
- Local number
0- Global number
0
After
Windows
- Window 5 · alpha.txt Active
40 columns × 7 lines- Window 4 · alpha.txt
39 columns × 11 lines
- Window 3 · alpha.txt
40 columns × 7 lines
- Window 1 · alpha.txt
39 columns × 10 lines
- Window 2 · alpha.txt
40 columns × 6 lines
Tab pages
- Tab 1 Active
alpha.txt, alpha.txt, alpha.txt, alpha.txt, alpha.txt
Option · number
- Local number
0- Global number
0
Start in Normal mode. All windows belong to this isolated example. The displayed :horizontal split has ordinary :split behavior. In pinned Vim, :horizontal affects :wincmd = by equalizing window widths only.
one two
three four
five six
keepCursor on line 1, column 1Details & Vim help
Example replayed in Vim
Use the horizontal command modifier. 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 :hor[izontal] 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. In pinned Vim 9.2, this modifier currently changes behavior only for :horizontal wincmd =, which equalizes window widths. The displayed :horizontal split is valid syntax with ordinary :split behavior.