How do I search across files and populate the quickfix list without jumping to the first match?
By default, :vimgrep jumps your cursor to the first match it finds, which can be disorienting when you just want to collect results and browse them on your own
category:
search
tags:
#search
#ex-commands
#buffers
How do I selectively merge changes between two files in Vim's diff mode?
When comparing two files side by side with :diffsplit or vim -d, you often want to pull specific changes from one file into another rather than accepting all di
category:
buffers-windows
tags:
#buffers
#windows
#editing
#ex-commands
How do I open a terminal in the current window instead of a new split?
By default, :terminal opens a new split window for the terminal emulator.
category:
buffers-windows
tags:
#terminal
#buffers
#windows
#shell
#ex-commands
How do I transfer diff hunks between files in Vim's diff mode?
When comparing two files side by side in Vim's diff mode (:diffsplit or vim -d file1 file2), you often want to accept or push individual changes between the fil
category:
navigation
tags:
#navigation
#editing
#buffers
#windows
How do I list only modified or active buffers in Vim?
The :ls command (or :buffers) supports filter flags that narrow the buffer list to specific states.
category:
buffers-windows
tags:
#buffers
#ex-commands
#workflow
#navigation
How do I scroll and copy text from a terminal buffer in Vim?
When using Vim's built-in :terminal, the buffer is in Terminal-Job mode by default, meaning all keystrokes go to the running shell.
category:
buffers-windows
tags:
#terminal
#buffers
#windows
#normal-mode
How do I filter the output of an Ex command to show only matching lines?
:filter /pattern/ command
The :filter command restricts the output of another Ex command to only lines matching a given pattern.
category:
command-line
tags:
#ex-commands
#command-line
#search
#buffers
How do I preview a tag definition in a preview window using :ptag?
The :ptag command opens a tag definition in a small preview window at the top of the screen, letting you read the definition without losing your place in the cu
category:
buffers-windows
tags:
#buffers
#windows
#tags
#preview
#navigation
How do I access the current and alternate filename registers in Vim?
Vim provides special read-only registers that hold the current and alternate filenames.
category:
registers
tags:
#registers
#filename
#special-registers
#buffers
How do I hide a buffer from the buffer list without closing it?
Setting nobuflisted removes a buffer from the :ls output and buffer-switching commands like :bnext/:bprev, while keeping it loaded and accessible.
category:
buffers-windows
tags:
#buffers-windows
#buffers
#unlisted
#management
How do I close all tabs and buffers except the current one?
:tabonly | %bdelete | edit #
When your Vim session becomes cluttered with many tabs and buffers, you can clean up by closing all tabs except the current one with :tabonly, then deleting all
category:
buffers-windows
tags:
#buffers-windows
#cleanup
#tabs
#buffers
How do I set up efficient keybindings for cycling through buffers?
Mapping ]b and [b to :bnext and :bprev creates an intuitive bracket-style navigation for buffers, matching the convention used by unimpaired.
category:
buffers-windows
tags:
#buffers-windows
#navigation
#mapping
#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 force Vim to check if open files were changed externally and reload them?
The :checktime command tells Vim to check whether any open buffers have been modified outside of Vim and prompt you to reload them.
category:
buffers-windows
tags:
#buffers
#ex-commands
#editing
How do I run a command across all open buffers at once?
:bufdo %s/old/new/ge | update
The :bufdo command executes an Ex command in every loaded buffer.
category:
buffers-windows
tags:
#buffers
#ex-commands
#editing
#substitution
How do I maximize a window to full height or make all windows equal size?
When working with multiple splits, you often want to focus on one window by making it as large as possible, then restore equal sizing when you're done.
category:
buffers-windows
tags:
#windows
#buffers
#navigation
#normal-mode
How do I quickly navigate quickfix entries, buffers, and toggle options with bracket keys?
The vim-unimpaired plugin by Tim Pope provides pairs of bracket mappings for common navigation and toggling tasks.
category:
plugins
tags:
#plugins
#navigation
#buffers
#quickfix
How do I open an existing buffer in a new split window?
The :sb (short for :sbuffer) command opens a buffer that is already loaded in Vim in a new horizontal split window.
category:
buffers-windows
tags:
#buffers
#windows
#ex-commands
How do I navigate between errors and results in the quickfix list?
The quickfix list is Vim's built-in way to collect a list of positions — typically compiler errors, grep results, or linter warnings — and jump between them
category:
buffers-windows
tags:
#buffers
#ex-commands
#navigation
How do I open a file in a new tab in Vim?
Vim's tab pages let you keep separate window layouts open at the same time, each with its own set of splits.
category:
buffers-windows
tags:
#buffers
#tabs
#windows
#ex-commands