How do I force any window-opening command to create a vertical split instead of horizontal?
The :vertical command modifier forces any window-opening Ex command to create a vertical split instead of the default horizontal split.
category:
buffers-windows
tags:
#windows
#buffers
#command-line
#splits
#ex-commands
How do I open a persistent file explorer sidebar using Vim's built-in netrw?
:Lexplore opens Vim's built-in netrw file explorer as a persistent sidebar anchored to the left of the screen.
category:
buffers-windows
tags:
#netrw
#file-explorer
#buffers
#windows
#navigation
How do I make the focused window automatically expand to a minimum size while keeping other windows visible?
:set winwidth=85 winheight=20
Setting winwidth and winheight tells Vim the minimum column width and line height the current focused window must have.
category:
buffers-windows
tags:
#windows
#buffers
#config
#navigation
How do I resolve a 3-way merge conflict by pulling changes from a specific buffer in diff mode?
When Vim's diff mode has three or more buffers open, :diffget (or do) without an argument is ambiguous — Vim cannot determine which buffer to pull from.
category:
buffers-windows
tags:
#buffers
#windows
#ex-commands
How do I compare the current buffer to another file using Vim's built-in diff mode without leaving the editor?
:diffsplit {file} opens a file in a horizontal split and immediately activates diff mode, highlighting the differences between both buffers.
category:
buffers-windows
tags:
#buffers
#windows
#editing
How do I force any split command to open as a vertical split in Vim?
Vim's :vertical modifier (abbreviated :vert) can be prepended to any Ex command that opens a split window to make it open as a vertical split instead of a horiz
category:
buffers-windows
tags:
#buffers-windows
#windows
#splits
#ex-commands
How do I add a per-window title bar in Neovim that shows context like the current filename?
Neovim 0.
category:
config
tags:
#config
#windows
#buffers-windows
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 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 open the previous file I was editing in a split window?
In Vim, # is a special filename that always refers to the alternate file — the most recently active buffer before the current one.
category:
buffers-windows
tags:
#buffers
#windows
#navigation
#editing
How do I make Vim always open new splits below and to the right instead of above and to the left?
:set splitright splitbelow
By default, :split opens a new window above the current one and :vsplit opens to the left — the opposite of most modern IDEs and editors.
category:
config
tags:
#config
#windows
#splits
#buffers-windows
How do I jump to a tag definition in a new split window instead of the current buffer?
Pressing g jumps to the definition of the tag under the cursor — just like — but opens the destination in a new horizontal split window.
category:
buffers-windows
tags:
#navigation
#buffers
#windows
#tags
How do I open any split command's result in a new tab instead of a split window?
Most commands that open a new window (:help, :split, :new, :terminal) open a horizontal split by default.
category:
buffers-windows
tags:
#tabs
#buffers
#windows
#ex-commands
How do I open all loaded buffers into split windows at once?
The :sball command (short for split all) opens every loaded buffer in its own horizontal split window in one shot.
category:
buffers-windows
tags:
#buffers-windows
#buffers
#windows
#tabs
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 peek at a function definition without leaving my current window?
:ptag {identifier} opens a small preview window showing the definition of the given tag, while keeping your cursor in the original window.
category:
navigation
tags:
#navigation
#tags
#windows
How do I execute Ctrl-W window commands from the command line or a Vimscript function?
:wincmd {key} executes any {key} window command from the Ex command line or from inside a Vimscript function.
category:
buffers-windows
tags:
#windows
#ex-commands
#buffers-windows
How do I open a specific buffer in a new split without navigating away from my current buffer?
:sbuffer {N} opens buffer number N in a new horizontal split, leaving your current window untouched.
category:
buffers-windows
tags:
#buffers-windows
#buffers
#windows
#navigation
How do I run the same Ex command in every open window at once?
:windo {cmd} executes an Ex command in every window in the current tab page, cycling through each one and applying the command before returning focus to the ori
category:
buffers-windows
tags:
#windows
#buffers
#ex-commands
#buffers-windows
How do I change the working directory for only the current window without affecting other windows or tabs?
:cd changes the global working directory, affecting every window and tab in the session.
category:
buffers-windows
tags:
#buffers
#windows
#ex-commands
#navigation