How do I enable diff mode in every open split at once?
If you already have several related files open in splits, enabling diff mode one window at a time is slow and error-prone.
category:
buffers-windows
tags:
#buffers-windows
#diff
#windows
#ex-commands
How do I resize a split window by an exact number of columns or rows using a count in Vim?
All four window resize mappings accept an optional count prefix that multiplies the resize amount.
category:
buffers-windows
tags:
#windows
#buffers-windows
#normal-mode
How do I prevent the cursor from jumping when opening a split in Neovim?
Controls how Neovim preserves the visual position of content when creating, closing, or resizing horizontal splits.
category:
buffers-windows
tags:
#windows
#splits
#neovim
#config
#buffers
How do I prevent a split window from being resized when I open new splits?
:set winfixwidth winfixheight
How it works When you open new split windows in Vim, the existing windows automatically resize to make room.
category:
buffers-windows
tags:
#windows
#ex-commands
#navigation
How do I make all split windows the same size?
The = (Ctrl+w then =) command resizes all open split windows so they have equal width and height.
category:
buffers-windows
tags:
#buffers-windows
#normal-mode
How do I always maximize the current split window when I switch focus without using plugins?
:set winwidth=999 winheight=999
Setting winwidth=999 and winheight=999 tells Vim to try to make the active window at least 999 columns wide and 999 rows tall whenever it gains focus.
category:
buffers-windows
tags:
#windows
#config
#buffers
How do I move between split windows using direction keys in Vim?
<C-w>h / <C-w>j / <C-w>k / <C-w>l
How it works Vim lets you navigate between split windows using followed by a direction key.
category:
buffers-windows
tags:
#windows
#navigation
#normal-mode
How do I keep the cursor column synchronized across two split windows while comparing files?
:set cursorbind (or :setlocal cursorbind) locks the cursor's column position so it moves in sync across all windows that have cursorbind enabled.
category:
buffers-windows
tags:
#buffers-windows
#windows
#navigation
How do I open a file for reference in a dedicated preview window without disturbing my split layout?
Vim has a built-in preview window — a special window distinct from regular splits.
category:
buffers-windows
tags:
#buffers
#windows
#navigation
#ex-commands
How do I put a register as true line list so embedded newlines stay split correctly?
Most register pastes are character-oriented, but advanced edits often need to preserve exact line structure.
category:
registers
tags:
#registers
#ex-commands
#scripting
#text-processing
How do I preview substitute changes inline while typing without opening a split?
When you are crafting a risky :substitute command, the expensive part is usually confidence, not typing.
category:
config
tags:
#config
#substitute
#search
#ex-commands
How do I jump directly to the top-left or bottom-right window in a complex split layout?
When managing multiple splits, t jumps to the top-left window and b jumps to the bottom-right window.
category:
buffers-windows
tags:
#windows
#navigation
#buffers
How do I temporarily maximize a split window to full height or width?
When working with multiple splits, you sometimes need to focus on one window temporarily without closing the others.
category:
buffers-windows
tags:
#windows
#buffers
#navigation
#editing
How do I split a single-line code statement into multiple lines or join them back in Vim?
The splitjoin.
category:
plugins
tags:
#plugins
#splitjoin
#editing
#refactoring
#formatting
How do I split a complex Vim macro into reusable subroutines?
Record worker macro in @b, call it from @a with @b
Complex macros are hard to debug and maintain when crammed into a single register.
category:
macros
tags:
#macros
#registers
#editing
How do I set a different working directory for each split window in Vim?
:lcd (local cd) sets the working directory for the current window only, leaving other windows at their previous directory.
category:
buffers-windows
tags:
#buffers-windows
#navigation
#ex-commands
#config
How do I resize a split window in Vim?
The + and - commands increase or decrease the height of the current split window by one line.
category:
buffers-windows
tags:
#buffers-windows
#windows
#normal-mode
How do I switch between split windows in Vim?
The (Ctrl+w Ctrl+w) command cycles the cursor to the next window in the current tab.
category:
buffers-windows
tags:
#buffers
#windows
#navigation
#normal-mode
How do I temporarily zoom a split window to full screen and then restore the layout?
<C-w>| and <C-w>_ / <C-w>=
Vim lets you temporarily maximize a split window to full width or full height, and then restore all windows to equal sizes with =.
category:
buffers-windows
tags:
#windows
#splits
#navigation
#productivity
#layout
How do I scroll two split windows in sync so they move together?
The scrollbind option locks two or more windows together so that scrolling in one window automatically scrolls the others by the same amount.
category:
buffers-windows
tags:
#windows
#navigation
#splits
#diff
#productivity