How do I quickly jump between function or method definitions in code?
The ]] and [[ commands let you jump forward and backward between section boundaries, which in most programming languages correspond to function or method defini
category:
navigation
tags:
#navigation
#motions
#normal-mode
#code
#functions
How do I visually select the next occurrence of my last search pattern?
The gn motion searches forward for the next match of the last search pattern and visually selects it.
category:
search
tags:
#navigation
#search
#motions
#normal-mode
#repeat
#editing
How do I jump to a specific percentage position in a file?
The {N}% command jumps the cursor to the line that is N percent of the way through the file.
category:
navigation
tags:
#navigation
#motions
#normal-mode
#productivity
How do I delete or change an entire paragraph of text in one motion?
The dap and dip commands use Vim's paragraph text objects to delete an entire block of contiguous text in a single motion.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#delete
#motions
What is the difference between backtick and single quote when jumping to marks?
Vim offers two ways to jump to a mark, and the difference is crucial: the backtick (` `) jumps to the exact line and column where the mark was set, while the si
category:
navigation
tags:
#navigation
#marks
#motions
#normal-mode
How do I quickly change an entire sentence in Vim?
The cis command deletes the entire sentence under the cursor and drops you into insert mode, ready to type a replacement.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#motions
#prose
How do I change text from the cursor up to a specific character?
The ct{char} command deletes everything from the cursor up to (but not including) the specified character and drops you into insert mode.
category:
editing
tags:
#editing
#motions
#normal-mode
#text-objects
#productivity
What is the difference between cw and ciw when changing a word?
The cw and ciw commands both change a word, but they behave differently depending on cursor position.
category:
editing
tags:
#editing
#text-objects
#motions
#normal-mode
#productivity
How do I scroll down half a page in Vim?
The (Ctrl+d) command scrolls the window down by half a screen, moving both the viewport and the cursor.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I scroll up half a page in Vim?
The (Ctrl+u) command scrolls the window up by half a screen, moving the cursor along with it.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I move the cursor to the end of a line?
The $ command moves the cursor to the last character of the current line.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I move to the first non-blank character of a line?
The ^ command moves the cursor to the first non-blank character of the current line.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump to the local definition of a variable in Vim?
The gd command jumps to the local definition of the word under the cursor.
category:
navigation
tags:
#navigation
#motions
#normal-mode
#search
How do I jump to the end of a word in Vim?
The e command moves the cursor to the last character of the current word.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump to the beginning of the next word?
The w command moves the cursor forward to the beginning of the next word.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump back to my previous cursor position?
The (Ctrl+o) command jumps the cursor backward through the jump list, returning you to previous cursor positions.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump to the beginning of the previous word?
The b command moves the cursor backward to the beginning of the previous word.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I move the cursor to the top of the visible screen?
The H command moves the cursor to the first line of the currently visible screen (the "High" position).
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump between paragraphs in Vim?
The { and } commands move the cursor by paragraph — jumping to the previous or next blank line.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump to a specific character on the current line?
The f{char} command moves the cursor forward to the next occurrence of {char} on the current line.
category:
navigation
tags:
#navigation
#motions
#normal-mode