How do I navigate compiler errors, grep results, or search matches using the quickfix list?
The quickfix list is Vim's built-in mechanism for navigating a list of file locations — compiler errors, grep results, search matches, or any structured outpu
category:
navigation
tags:
#navigation
#quickfix
#ex-commands
#productivity
#workflow
How do I find which Vim scripts or functions are slow and causing performance issues?
:profile start profile.log
When Vim feels sluggish, the built-in :profile command lets you measure exactly how much time each script and function consumes.
category:
config
tags:
#config
#ex-commands
#performance
How do I reformat text to fit textwidth without moving the cursor from its current position?
The gw operator reformats text just like gq, but leaves the cursor exactly where it started.
category:
editing
tags:
#formatting
#editing
#normal-mode
#motions
How do I automatically save and restore fold states between Vim sessions using autocmds?
autocmd BufWinLeave * mkview
By default, Vim forgets your folds, cursor position, and scroll state every time you close a file.
category:
config
tags:
#folding
#autocmd
#config
#persistence
#view
How do I use the location list instead of the quickfix list to have per-window grep results?
The location list is a per-window counterpart to the global quickfix list.
category:
buffers-windows
tags:
#buffers-windows
#ex-commands
#search
#navigation
How do I wrap text with an HTML tag using vim-surround?
The vim-surround plugin makes wrapping text in HTML or XML tags effortless.
category:
plugins
tags:
#plugins
#surround
#html
#editing
#tags
How do I quickly replace all occurrences of the word under my cursor?
Pressing searches for the word under the cursor, which also loads it into the search register.
category:
search
tags:
#search
#substitute
#workflow
#editing
#rename
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 search and replace text containing special characters?
:%s/\V literal.text/replacement/g
The \V (very nomagic) flag treats all characters as literal except for \.
category:
search
tags:
#search
#ex-commands
How do I enable automatic indentation?
The autoindent option copies the indentation from the current line when starting a new line.
category:
config
tags:
#config
#indentation
#ex-commands
How do I enable automatic file type detection and plugins?
:filetype plugin indent on
The filetype plugin indent on command enables three key features: file type detection, filetype plugins, and filetype-based indentation.
category:
config
tags:
#config
#ex-commands
How do I get language support for many programming languages at once?
Plug 'sheerun/vim-polyglot'
vim-polyglot is a collection of language packs for Vim.
category:
plugins
tags:
#plugins
#config
How do I add, change, or delete surrounding characters with vim-surround?
cs"' (change), ds" (delete), ys iw" (add)
The vim-surround plugin by Tim Pope adds commands for working with surrounding characters like quotes, brackets, and tags.
category:
plugins
tags:
#plugins
#editing
#text-objects
How do I access Vim's built-in help system?
Vim has an extensive built-in help system.
category:
command-line
tags:
#command-line
#ex-commands
How do I select an HTML tag and its contents in Vim?
The vat command visually selects the nearest enclosing HTML or XML tag and all of its contents, including the opening and closing tags themselves.
category:
visual-mode
tags:
#visual-mode
#text-objects
#editing
#normal-mode
How do I redraw the screen with the cursor line at center or bottom and move to the first non-blank character?
Vim has scroll-positioning commands that come in two flavors: those that leave the cursor in the current column (zz, zt, zb) and those that also move the cursor
category:
navigation
tags:
#navigation
#normal-mode
#scrolling
How do I enable true color (24-bit) support in Vim?
The termguicolors option enables 24-bit RGB color support, allowing color schemes to use millions of colors instead of the terminal's 256-color palette.
category:
config
tags:
#config
#ex-commands
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 use Vim as an inline calculator with the expression register?
The expression register ("=) evaluates Vimscript expressions and returns the result.
category:
registers
tags:
#registers
#insert-mode
#expression
#calculator
#vimscript
How do I select text character by character in Vim?
The v command enters character-wise visual mode, letting you select text one character at a time.
category:
visual-mode
tags:
#visual-mode
#normal-mode