How do I jump between diff hunks when comparing files with Vim's built-in diff mode?
When files are open in Vim's built-in diff mode — whether via vimdiff, :diffsplit, or :diffthis — the ]c and [c motions let you jump precisely between chang
category:
navigation
tags:
#navigation
#diff
#buffers-windows
#normal-mode
How do I send Telescope results to the quickfix list for bulk editing?
While inside any Telescope picker, pressing sends all current results to the quickfix list and closes the picker.
category:
plugins
tags:
#plugins
#search
#quickfix
#buffers-windows
How do I programmatically populate the quickfix list from Vimscript?
setqflist() lets you build the quickfix list from a Vimscript list of dictionaries rather than relying on compiler output or :vimgrep.
category:
command-line
tags:
#ex-commands
#buffers
How do I read the contents of a Vim register into a variable or expression using Vimscript?
The getreg({name}) function returns the content of any register as a string.
category:
registers
tags:
#registers
#ex-commands
How do I run the same command across all open buffers at once?
When you need to apply the same change to every file you have open in Vim, switching to each buffer manually is tedious and error-prone.
category:
buffers-windows
tags:
#buffers
#ex-commands
#editing
#batch
How do I navigate quickfix and location list entries with intuitive bracket mappings?
The vim-unimpaired plugin by Tim Pope provides bracket-pair mappings for navigating quickfix and location list entries: [q moves to the previous entry and ]q mo
category:
plugins
tags:
#plugins
#navigation
#quickfix
How do I see exactly which highlight groups are responsible for the color of the character under the cursor in Neovim?
When customizing a colorscheme or debugging unexpected syntax colors, it's difficult to know which highlight group to override.
category:
config
tags:
#config
#normal-mode
How do I run a find-and-replace across multiple files at once using the argument list?
:args **/*.py | argdo %s/old/new/ge | update
Combining :args, :argdo, and :update gives you a powerful in-editor multi-file search and replace without leaving Vim.
category:
command-line
tags:
#ex-commands
#editing
#macros
#search
How do I control exactly what Vim saves when I create a session with :mksession?
The sessionoptions option (abbreviated ssop) is a comma-separated list of flags that determine what :mksession stores in the session file.
category:
buffers-windows
tags:
#buffers-windows
#config
#workflow
#sessions
How do I append text to the end of multiple lines with different lengths in visual block mode?
In visual block mode, pressing $ makes the right edge of the selection "ragged" — it extends to the real end of each line regardless of length.
category:
visual-mode
tags:
#visual-mode
#editing
#normal-mode
How do I remove a word I accidentally added to my Vim spell dictionary?
When spell checking is active, pressing zg over a word adds it to your personal word list so Vim stops flagging it.
category:
config
tags:
#config
#editing
How do I disable or customize virtual text diagnostic messages in Neovim's built-in LSP?
:lua vim.diagnostic.config({virtual_text = false})
Neovim's built-in diagnostic system (vim.
category:
plugins
tags:
#lsp
#neovim
#diagnostics
#plugins
#config
How do I move to the first or last non-blank character of a soft-wrapped display line?
When wrap is on, long lines wrap visually across multiple screen lines.
category:
navigation
tags:
#navigation
#normal-mode
#motions
How do I find and open a file by name without knowing its full path?
The :find command searches for a file by name across all directories in your path setting and opens it.
category:
buffers-windows
tags:
#buffers
#file-management
#navigation
#workflow
How do I make j and k navigate display lines normally but physical lines when given a count?
nnoremap <expr> j v:count == 0 ? 'gj' : 'j'
By default, j and k move by physical lines (newline-delimited), which jumps over the entire visual span of a long wrapped line in a single keystroke.
category:
config
tags:
#navigation
#config
#motions
#normal-mode
How do I format the current buffer using the language server protocol in Neovim?
Neovim's built-in LSP client exposes vim.
category:
plugins
tags:
#plugins
#lsp
#formatting
#neovim
#editing
How do I programmatically remove or unmap a keybinding in Neovim Lua without knowing its original definition?
vim.
category:
config
tags:
#config
#neovim
#mappings
#lsp
#normal-mode
How do I list all open buffers in Vim?
The :ls command displays a list of all open buffers in Vim, showing their buffer number, status indicators, file name, and the line the cursor was last on.
category:
buffers-windows
tags:
#buffers
#ex-commands
#navigation
How do I save and restore the cursor position and scroll state in a Vimscript function?
winsaveview() and winrestview()
When writing Vimscript functions or complex mappings that move the cursor, it is essential to restore the original view afterward so the user does not notice an
category:
config
tags:
#ex-commands
#normal-mode
How do I jump to any visible text on screen with a two-character search using flash.nvim in Neovim?
flash.
category:
plugins
tags:
#navigation
#motions
#plugins
#search