How do I scroll a full page up or down in Vim?
<C-f> to scroll forward, <C-b> to scroll backward
How it works Vim provides two commands for scrolling by an entire screen (page) at a time: Ctrl-F (Forward) scrolls the view one full page down through the file
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I navigate by WORD boundaries that include punctuation in Vim?
How it works Vim distinguishes between two types of word objects: A word (lowercase w, b, e) is a sequence of letters, digits, and underscores, or a sequence of
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I visually select from the cursor to the matching bracket or parenthesis?
How it works The % motion jumps to the matching bracket, parenthesis, or brace.
category:
visual-mode
tags:
#visual-mode
#navigation
#motions
#editing
How do I prevent a split window from being resized when I open new splits?
:set winfixwidth winfixheight
How it works When you open new split windows in Vim, the existing windows automatically resize to make room.
category:
buffers-windows
tags:
#windows
#ex-commands
#navigation
How do I move the cursor to the middle or bottom of the visible screen?
M to move to the middle, L to move to the bottom
How it works Vim offers three commands to jump the cursor to specific vertical positions on the visible screen without scrolling: H moves to the top of the scre
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I close all buffers except the current one in Vim?
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#.
category:
buffers-windows
tags:
#buffers
#ex-commands
#navigation
How do I preview a function or tag definition without leaving my current position?
How it works The } command opens a preview window showing the tag definition of the word under your cursor.
category:
buffers-windows
tags:
#windows
#navigation
#normal-mode
How do I open an existing buffer in a new tab page in Vim?
How it works The :tab sb N command opens buffer number N in a brand new tab page.
category:
buffers-windows
tags:
#buffers
#tabs
#ex-commands
#navigation
How do I open the file path under my cursor in a new split window?
How it works You may already know that gf opens the file path under the cursor in the current window.
category:
buffers-windows
tags:
#windows
#navigation
#normal-mode
#buffers
How do I switch between character, line, and block visual modes?
v, V, or Ctrl-V while in visual mode
How it works Vim has three visual modes, and you can switch between them without losing your current selection: v - Characterwise visual mode (select individual
category:
visual-mode
tags:
#visual-mode
#navigation
#editing
How do I swap the contents of two split windows in Vim?
How it works The x command exchanges the current window with the next one.
category:
buffers-windows
tags:
#windows
#navigation
#normal-mode
How do I switch to a specific buffer by its number in Vim?
How it works Every buffer in Vim is assigned a unique number when it is opened.
category:
buffers-windows
tags:
#buffers
#navigation
#ex-commands
How do I set up LSP-powered autocompletion in Vim with coc.nvim?
coc.
category:
plugins
tags:
#plugins
#completion
#navigation
#editing
How do I move between split windows using direction keys in Vim?
<C-w>h / <C-w>j / <C-w>k / <C-w>l
How it works Vim lets you navigate between split windows using followed by a direction key.
category:
buffers-windows
tags:
#windows
#navigation
#normal-mode
How do I select a word under the cursor in visual mode?
How it works The command viw selects the word under the cursor in visual mode.
category:
visual-mode
tags:
#visual-mode
#text-objects
#editing
#navigation
How do I see git diff changes in the Vim sign column with vim-gitgutter?
vim-gitgutter is a plugin that shows git diff markers in the sign column (the narrow column to the left of line numbers).
category:
plugins
tags:
#plugins
#editing
#navigation
How do I close the current buffer in Vim?
How it works The :bdelete command (often abbreviated :bd) removes the current buffer from Vim's buffer list and closes it.
category:
buffers-windows
tags:
#buffers
#navigation
#ex-commands
How do I move the cursor to the other end of a visual selection?
While in visual mode, pressing o swaps the cursor to the opposite end of the selection.
category:
visual-mode
tags:
#visual-mode
#selection
#cursor
#navigation
How do I navigate through code using tags and the tag stack?
The command jumps to the definition of the keyword under the cursor using a tags file, and jumps back.
category:
navigation
tags:
#navigation
#tags
#code-navigation
#ctags
How do I search for a pattern and land on a specific line offset from the match?
/pattern/+N or /pattern/-N
Vim's search command accepts an offset that places your cursor on a line relative to the match.
category:
navigation
tags:
#navigation
#search
#offset
#motions