How do I switch to the next buffer in Vim?
:bnext
The :bnext (or :bn for short) command switches to the next buffer in Vim's buffer list.
:bnext
The :bnext (or :bn for short) command switches to the next buffer in Vim's buffer list.
:tabnew filename
The :tabnew filename command opens a file in a new tab page in Vim.
buffers-windows #buffers-windows #tabs #ex-commands #navigation
:bprev
The :bprev (or :bp for short) command switches to the previous buffer in Vim's buffer list.
e
The e command moves the cursor to the last character of the current word.
`.
The ` .
w
The w command moves the cursor forward to the beginning of the next word.
<C-o>
The (Ctrl+o) command jumps the cursor backward through the jump list, returning you to previous cursor positions.
b
The b command moves the cursor backward to the beginning of the previous word.
H
The H command moves the cursor to the first line of the currently visible screen (the "High" position).
: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.
{ and }
The { and } commands move the cursor by paragraph — jumping to the previous or next blank line.
f{char}
The f{char} command moves the cursor forward to the next occurrence of {char} on the current line.
t{char}
The t{char} command moves the cursor forward to the character just before the next occurrence of {char} on the current line.
gg
The gg command moves the cursor to the first line of the file.
G
The G command moves the cursor to the last line of the file.
42G
The 42G command jumps the cursor directly to line 42 in the current file.
zz
The zz command scrolls the window so that the current cursor line appears in the middle of the screen.
%
The % command jumps to the matching bracket, parenthesis, or brace.