How do I list all lines matching a pattern across the current file and its includes?
The :ilist command searches for a pattern not only in the current buffer but also in files referenced by #include directives (or whatever 'include' is set to).
category:
search
tags:
#search
#ex-commands
#navigation
#editing
How do I get a detailed word, character, and byte count in Vim?
While shows basic file info (filename, line count, position), g provides a much more detailed statistical breakdown of your file or visual selection.
category:
navigation
tags:
#navigation
#normal-mode
#visual-mode
How do I run commands without polluting the jump list?
When writing scripts or running commands that move the cursor (like :g, :s, or :normal), Vim normally adds each cursor position to the jump list.
category:
command-line
tags:
#navigation
#ex-commands
#normal-mode
#editing
How do I list only modified or active buffers in Vim?
The :ls command (or :buffers) supports filter flags that narrow the buffer list to specific states.
category:
buffers-windows
tags:
#buffers
#ex-commands
#workflow
#navigation
How do I jump between method or function definitions in code?
When navigating large source files, ]m and [m let you jump directly to the start of the next or previous method.
category:
navigation
tags:
#navigation
#motions
#normal-mode
#editing
How do I move the cursor to the other end of a Visual selection in Vim?
When you make a Visual selection in Vim, the cursor sits at one end while the other end is anchored.
category:
visual-mode
tags:
#visual-mode
#editing
#navigation
#motions
How do I look up documentation for the keyword under the cursor?
Pressing K in normal mode runs a lookup program on the word under the cursor.
category:
navigation
tags:
#navigation
#help
#documentation
#normal-mode
#keywordprg
How do I preview a tag definition in a preview window using :ptag?
The :ptag command opens a tag definition in a small preview window at the top of the screen, letting you read the definition without losing your place in the cu
category:
buffers-windows
tags:
#buffers
#windows
#tags
#preview
#navigation
How do I preview quickfix entries without leaving the quickfix window?
The preview window shows file contents temporarily without switching your editing context.
category:
buffers-windows
tags:
#buffers-windows
#quickfix
#preview
#navigation
How do I quickly switch between a set of frequently used files with Harpoon?
:lua require('harpoon.ui').toggle_quick_menu()
Harpoon by ThePrimeagen lets you mark a small set of files (typically 4-6) and instantly switch between them with dedicated keybindings.
category:
plugins
tags:
#plugins
#harpoon
#navigation
#file-switching
How do I scroll the screen to position the cursor line at the center, top, or bottom?
Vim's z scroll commands reposition the screen relative to the cursor without moving the cursor itself.
category:
navigation
tags:
#navigation
#scrolling
#viewport
#cursor-position
How do I navigate by sentences, paragraphs, and sections in Vim?
Vim provides structural navigation motions that move by sentences, paragraphs, and sections.
category:
navigation
tags:
#navigation
#motions
#sentence
#paragraph
How do I navigate back through the tag stack after jumping to definitions?
When you jump to a tag definition with , Vim pushes your location onto a tag stack.
category:
navigation
tags:
#navigation
#tags
#tag-stack
#code-navigation
What is the difference between word and WORD motions in Vim?
Vim distinguishes between "words" (sequences of keyword characters) and "WORDS" (sequences of non-blank characters).
category:
navigation
tags:
#navigation
#motions
#word
#word-motion
How do I navigate through wrapped lines visually instead of by actual lines?
When wrap is enabled, long lines wrap across multiple screen lines.
category:
navigation
tags:
#navigation
#motions
#wrapped-lines
#display
How do I use count prefixes to amplify motions and operators in Vim?
Almost every Vim motion and operator accepts a numeric count prefix that repeats or amplifies the action.
category:
navigation
tags:
#navigation
#motions
#count
#operators
What is the difference between 0 and ^ for moving to the beginning of a line?
Vim has two distinct motions for moving to the start of a line: 0 goes to column 1 (the absolute start), while ^ goes to the first non-blank character.
category:
navigation
tags:
#navigation
#motions
#line-navigation
#indentation
What is the difference between backtick and apostrophe when jumping to marks?
Vim has two ways to jump to marks: backtick (` `) jumps to the exact line AND column, while apostrophe (') jumps to the line only, positioning the cursor at the
category:
navigation
tags:
#navigation
#marks
#positioning
#motions
How do I jump between method or function definitions in Vim?
The [m and ]m motions jump to the start of method/function definitions in languages with brace-delimited blocks.
category:
navigation
tags:
#navigation
#motions
#methods
#code-navigation
How do I repeat or reverse inline character search with f, t, ; and , in Vim?
The f, F, t, and T motions search for a character on the current line.
category:
navigation
tags:
#navigation
#motions
#find
#inline-search