How do you delete a specific buffer by its number?
:bd 3
Use :bd (bdelete) followed by the buffer number.
13 results for ":bd"
:bd 3
Use :bd (bdelete) followed by the buffer number.
:bp | bd #
The :bp bd # command switches to the previous buffer and then deletes the alternate buffer.
:%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#.
:bdelete
How it works The :bdelete command (often abbreviated :bd) removes the current buffer from Vim's buffer list and closes it.
:b {number}
The :b command followed by a buffer number switches directly to that buffer.
:bwipeout
The :bwipeout command (:bw) completely removes a buffer from Vim's memory, including its marks, options, and variables.
:cabbrev
:cabbrev (command-line abbreviation) lets you define short aliases for longer Ex commands.
<C-a> (command-line mode)
In command-line mode, inserts all completions for the word before the cursor at once, as a space-separated list.
:tab ball
:tab ball (short for :tab sball, "split all buffers in tabs") opens every listed buffer in its own tab page in a single command.
:bprev
The :bprev (or :bp for short) command switches to the previous buffer in Vim's buffer list.
:'a,'bs/old/new/g
Named marks can serve as range endpoints for any Ex command, including :substitute.
: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>c
The c (Ctrl+w then c) command closes the current window without closing the buffer it contains.