How do you switch to a buffer by its number?
:b3
Use :b followed by the buffer number.
55 results for "buffer number"
:b3
Use :b followed by the buffer number.
:bd 3
Use :bd (bdelete) followed by the buffer number.
:b {number}
The :b command followed by a buffer number switches directly to that buffer.
:b N
How it works Every buffer in Vim is assigned a unique number when it is opened.
:ls
The :ls command displays a list of all open buffers in Vim, showing their buffer number, status indicators, file name, and the line the cursor was last on.
<C-w>^
Vim tracks the alternate buffer — the last file you were editing before the current one.
:sb 3
Use :sb (sbuffer) followed by the buffer number to open that buffer in a new horizontal split.
:options
:options opens a special Vim buffer that lists every available option, grouped by category (appearance, editing, search, etc.
:bdelete
How it works The :bdelete command (often abbreviated :bd) removes the current buffer from Vim's buffer list and closes it.
:set option
The :set command changes Vim options for the current session.
:bwipeout
The :bwipeout command (:bw) completely removes a buffer from Vim's memory, including its marks, options, and variables.
:enew
The :enew command creates a new unnamed empty buffer in the current window.
:setlocal nobuflisted
Setting nobuflisted removes a buffer from the :ls output and buffer-switching commands like :bnext/:bprev, while keeping it loaded and accessible.
buffers-windows #buffers-windows #buffers #unlisted #management
:Buffers
The fzf.
:sb {buffer}
The :sb (short for :sbuffer) command opens a buffer that is already loaded in Vim in a new horizontal split window.
:set statusline=%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
Vim's built-in statusline option lets you build a custom status bar that displays exactly the information you want — without any plugin.
:bprev
The :bprev (or :bp for short) command switches to the previous buffer in Vim's buffer list.
:bnext
The :bnext (or :bn for short) command switches to the next buffer in Vim's buffer list.
:ls!
:ls (or :buffers) shows Vim's buffer list, but it hides unlisted buffers — help files, directory listings (netrw), terminal buffers, and scratch buffers marke
:changes
How it works Vim maintains a change list that records the position of every change you make to a buffer.