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 send Telescope results to the quickfix list for bulk editing?
While inside any Telescope picker, pressing sends all current results to the quickfix list and closes the picker.
category:
plugins
tags:
#plugins
#search
#quickfix
#buffers-windows
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 open the alternate (previously visited) buffer in a new split window?
Vim tracks the alternate buffer — the last file you were editing before the current one.
category:
buffers-windows
tags:
#buffers-windows
#navigation
#windows
How do I automatically equalize window sizes when the terminal is resized?
:autocmd WinResized * wincmd =
When you resize your terminal window, Vim's split layout can become unbalanced.
category:
buffers-windows
tags:
#buffers-windows
#autocmd
#resize
#layout
How do I prevent a split window from being resized by Vim?
When you have a specific window you want to keep at a fixed size — like a terminal, log viewer, or reference file — winfixheight and winfixwidth prevent Vim
category:
buffers-windows
tags:
#buffers-windows
#windows
#resize
#layout
How do I create a floating window in Neovim?
:lua vim.api.nvim_open_win(0, true, {relative='editor', width=80, height=20, row=5, col=10})
Neovim's floating windows hover above the main layout, creating popup-like UI elements.
category:
buffers-windows
tags:
#buffers-windows
#floating
#neovim
#api
How do I preview quickfix entries without leaving the quickfix window?
The preview window shows file contents temporarily without switching your editing context.
category:
buffers-windows
tags:
#buffers-windows
#quickfix
#preview
#navigation
How do I rotate or swap window positions in Vim?
Vim provides commands to rotate windows within a row or column, and to swap the current window with another.
category:
buffers-windows
tags:
#buffers-windows
#windows
#rotate
#layout
How do I run the same command across all windows, buffers, or tabs?
Vim provides iterator commands that execute an Ex command across all windows, buffers, tabs, or argument list files.
category:
buffers-windows
tags:
#buffers-windows
#windo
#bufdo
#batch-commands
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 make Vim automatically reload files changed outside the editor?
:set autoread | autocmd FocusGained * checktime
When working with Git, build tools, or collaborators, files may change outside Vim.
category:
buffers-windows
tags:
#buffers-windows
#autoread
#file-detection
#external-changes
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 make a buffer completely read-only and unmodifiable?
While :set readonly prevents accidental writes, nomodifiable goes further by preventing any changes to the buffer contents entirely.
category:
buffers-windows
tags:
#buffers-windows
#readonly
#modifiable
#protection
How do I incrementally grow or shrink a split window by a specific number of lines or columns?
:resize adjusts the height of the current window by a relative or absolute amount.
category:
buffers-windows
tags:
#buffers-windows
#ex-commands
How do I list all buffers including unlisted ones like help pages and terminal buffers?
:ls (or :buffers) shows Vim's buffer list, but it hides unlisted buffers — help files, directory listings (netrw), terminal buffers, and scratch buffers marke
category:
buffers-windows
tags:
#buffers-windows
#ex-commands
How do I open a new empty buffer in a horizontal split without opening any file?
n creates a new empty buffer and opens it in a horizontal split above the current window.
category:
buffers-windows
tags:
#buffers-windows
#editing
How do I open the file whose name is under the cursor in a new tab?
gf reads the filename under the cursor and opens it in a new tab page, keeping your current buffer untouched.
category:
navigation
tags:
#navigation
#buffers-windows
#tabs
How do I compare two files side by side using Vim's built-in diff mode?
:vertical diffsplit {file}
Vim has a built-in diff mode that highlights added, removed, and changed lines between two (or more) buffers.
category:
buffers-windows
tags:
#buffers-windows
#ex-commands
#navigation