How do I jump between diff hunks in a diff view?
In diff mode, ]c jumps to the next change hunk and [c jumps to the previous one.
category:
navigation
tags:
#navigation
#editing
#normal-mode
How do I move by display lines when long lines wrap?
The gj command moves the cursor down by one display line rather than one physical line.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I move the cursor to a specific column on the current line?
The command moves the cursor to a specific screen column on the current line.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I cycle through positions where I made changes?
The g; command moves backward through the change list, jumping to positions where edits were made.
category:
navigation
tags:
#navigation
#marks
#normal-mode
How do I jump to a tag definition using the tag stack?
The command jumps to the definition of the keyword under the cursor using tag files.
category:
navigation
tags:
#navigation
#ex-commands
#normal-mode
How do I jump to the next unmatched opening brace?
The [{ command moves backward to the nearest unmatched {.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump to the next unmatched closing parenthesis?
The ]) command moves forward to the next unmatched ).
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump to a percentage position in a file?
When used with a count, the % command jumps to the line at that percentage of the file.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump to the start of the next method or function?
The ]m command jumps to the start of the next method in Java-style code.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I open the file under the cursor and jump to a specific line?
The gF command opens the file under the cursor and jumps to the line number that appears after the filename.
category:
navigation
tags:
#navigation
#buffers
#normal-mode
How do I move the cursor to the middle of the visible screen?
The M command moves the cursor to the line in the middle of the current window.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I move the cursor to the bottom of the visible screen?
The L command moves the cursor to the last line visible in the current window.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump forward by paragraph in Vim?
The } motion moves the cursor forward to the next blank line, effectively jumping to the next paragraph.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump forward by sentence in Vim?
The ) motion moves the cursor to the beginning of the next sentence.
category:
navigation
tags:
#navigation
#motions
#normal-mode
#text-objects
How do I jump directly to a specific line number in Vim?
When you know the exact line number you want to navigate to, the colon command is the quickest way to get there.
category:
navigation
tags:
#navigation
#motions
#ex-commands
How do I jump backward by paragraph in Vim?
The { motion moves the cursor backward to the previous blank line, jumping to the beginning of the current or previous paragraph.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I move backward to the end of the previous word?
The ge motion moves the cursor backward to the end of the previous word.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I cycle through my jump history in Vim?
Vim maintains a jump list of positions you have visited.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I move backward to a character on the current line?
The F command moves the cursor backward to the previous occurrence of a specified character on the current line.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I highlight trailing whitespace with a custom color in Vim?
highlight TrailingWhitespace ctermbg=red and match TrailingWhitespace /\s\+$/
How it works Vim's highlight and match commands let you create custom visual indicators.
category:
config
tags:
#editing
#formatting
#search