How do I open an existing buffer in a new split window?
:sb {buffer}
The :sb (short for :sbuffer) command opens a buffer that is already loaded in Vim in a new horizontal split window.
73 results for ":ls"
:sb {buffer}
The :sb (short for :sbuffer) command opens a buffer that is already loaded in Vim in a new horizontal split window.
:bdelete
How it works The :bdelete command (often abbreviated :bd) removes the current buffer from Vim's buffer list and closes it.
g<
Pressing g or q to dismiss it again Example Tips :messages also shows recent messages (and those accumulate across the session), while g< only shows the last pa
:b partial<Tab>
The :b (buffer) command accepts partial filename matching with tab completion.
%:t:r
Vim's % special character expands to the current filename and accepts a chain of colon-delimited modifiers.
command-line #command-line #ex-commands #editing #navigation
:hide edit {file}<CR>
Normally, trying to :edit another file from a modified buffer triggers a warning and blocks the switch unless you save or force the command.
buffers-windows #buffers #windows #workflow #command-line #editing
:%bd | e#
How it works Vim does not have a built-in single command to close all buffers except the current one, but you can achieve this with a two-part command: :%bd e#.
<C-w>^
Vim tracks the alternate buffer — the last file you were editing before the current one.
:filter /pattern/ {command}
:filter /pattern/ {command} runs any Ex command but suppresses every output line that does not match the pattern.
:bufdo {cmd}
:bufdo executes an Ex command in each open buffer in sequence, cycling through every buffer in the buffer list.
:ball
The :ball command opens a window for every buffer in the buffer list.
"# register
The # register contains the name of the alternate file — the previously edited file in the current window.
gd / gr / <leader>rn with nvim-lspconfig
The Language Server Protocol (LSP) brings IDE-level intelligence to Neovim — go-to-definition, find references, rename symbol, and more.
:bwipeout
The :bwipeout command (:bw) completely removes a buffer from Vim's memory, including its marks, options, and variables.
:enew | setlocal buftype=nofile bufhidden=wipe noswapfile
A scratch buffer is a temporary, unnamed buffer that exists only in memory — it won't prompt you to save when you close it and leaves no trace on disk.
buffers-windows #buffers #editing #ex-commands #productivity #workflow
:sball
The :sball command (short for split all) opens every loaded buffer in its own horizontal split window in one shot.
systemlist()
systemlist({cmd}) runs a shell command and returns the output as a list of strings, one per line — unlike system() which returns everything as a single string
:bufdo keeppatterns %s/\s\+$//e | update
If you keep many files open during a refactor, cleaning trailing whitespace one buffer at a time is slow and error-prone.
:wall
When working across multiple files, you often have unsaved changes in several buffers.
<C-w>d
Neovim 0.
buffers-windows #diagnostics #lsp #floating-window #neovim #buffers #windows