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 use the alternate file register to quickly reference the previous file?
"#p or <C-r># in insert mode
The # register always contains the name of the alternate file — typically the file you were editing just before the current one.
category:
registers
tags:
#registers
#buffers
#file-management
#workflow
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 create and auto-format Markdown or textile tables in Vim?
The vim-table-mode plugin by Dhruva Sagar turns Vim into a powerful table editor that automatically formats and aligns table columns as you type.
category:
plugins
tags:
#plugins
#table-mode
#markdown
#formatting
#editing
How do I quickly toggle options and navigate lists using bracket mappings in Vim?
The vim-unimpaired plugin by Tim Pope provides a consistent set of bracket-based mappings for toggling Vim options, navigating paired lists, and performing comm
category:
plugins
tags:
#plugins
#unimpaired
#navigation
#options
#workflow
How do I jump to the middle of a line in Vim?
The gM command moves the cursor to the horizontal middle of the current line, regardless of how long the line is.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I use mini.nvim's modular plugins for surround, comment, and more?
:lua require('mini.surround').setup()
mini.
category:
plugins
tags:
#plugins
#mini-nvim
#modular
#neovim
How do I run a substitute command without changing my current search pattern?
:keeppattern %s/pattern/replacement/g
When you run a :substitute command, Vim updates the search register (@/) with the substitute pattern, which changes your hlsearch highlighting and affects n/N n
category:
search
tags:
#ex-commands
#search
#editing
How do I redo an undone change in Vim?
The (Ctrl+r) command redoes the last change that was undone with u.
category:
editing
tags:
#editing
#undo-redo
#normal-mode
How do I search for patterns only at specific line or column positions in Vim?
Vim provides position-matching atoms that constrain where a pattern can match based on line numbers, column positions, or virtual columns.
category:
search
tags:
#search
#regex
#position
#columns
How do I get a visual tab-completion menu for Vim commands and filenames?
The wildmenu option enhances Vim's command-line completion by showing a horizontal menu of matches above the command line when you press .
category:
config
tags:
#config
#command-line
#completion
#productivity
#vimrc
How do I search for the word under the cursor?
The command searches forward for the exact word under the cursor, jumping to the next occurrence.
category:
search
tags:
#search
#navigation
#normal-mode
How do I swap a word with the contents of a register using visual mode?
The viwp command visually selects the word under the cursor and replaces it with the contents of the unnamed register (your last yank or delete).
category:
visual-mode
tags:
#editing
#visual-mode
#registers
#paste
#productivity
How do I align columns of text into a neatly formatted table in Vim?
When working with data that has uneven spacing — such as variable assignments, CSV-like data, or configuration entries — you can select the lines and pipe t
category:
visual-mode
tags:
#visual-mode
#editing
#formatting
#external-command
#alignment
How do I quickly surround a word with quotes, brackets, or parentheses?
Vim doesn't have a built-in "surround" operator, but you can wrap any word in quotes or brackets with a short sequence: ciw""P.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#productivity
#surround
How do I access my delete history beyond the last delete?
Vim maintains a numbered register history from "1 through "9 that stores your last 9 deletes and changes.
category:
registers
tags:
#registers
#undo-redo
#delete
#history
#paste
How do I indent or unindent selected lines in visual mode?
How it works In visual mode, you can shift selected lines to the right or left using the > and to indent them or or shifts the selected lines one shiftwidth to
category:
visual-mode
tags:
#visual-mode
#indentation
#editing
#formatting
How do I create abbreviations for common Ex commands?
Command-line abbreviations with cabbrev let you create short aliases for frequently used Ex commands.
category:
command-line
tags:
#command-line
#abbreviation
#shortcuts
#productivity
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 match only part of a search pattern in Vim using \zs and \ze?
Vim's \zs (start of match) and \ze (end of match) atoms let you define a search pattern but only highlight or operate on a portion of it.
category:
search
tags:
#search
#regex
#substitution
#ex-commands
#editing