How do I append additional keystrokes to a recorded macro using Vimscript without re-recording it?
The string concatenation assignment :let @q .
category:
macros
tags:
#macros
#registers
#editing
#normal-mode
How do I save the current search pattern into a named register before it gets overwritten by a new search?
Vim stores the last search pattern in the special / register (@/).
category:
registers
tags:
#registers
#search
#ex-commands
How do I delete consecutive duplicate lines from a file using a single Ex command?
The :g command with a backreference pattern can detect and delete consecutive duplicate lines in one pass.
category:
command-line
tags:
#ex-commands
#search
#editing
#normal-mode
How do I force a Vim operator to act linewise even when the motion is normally characterwise?
In operator-pending mode — the brief state after typing an operator like d, c, or y but before entering the motion — you can prefix the motion with v, V, or
category:
editing
tags:
#editing
#motions
#normal-mode
#operators
How do I visually select multiple paragraphs or text objects at once using a count prefix?
In Vim, text objects accept a count prefix in visual mode, letting you select multiple consecutive text objects in one keystroke.
category:
visual-mode
tags:
#visual-mode
#text-objects
#motions
#editing
How do I position the cursor at a specific character offset from a search match?
Vim's search command supports an offset suffix that controls where the cursor lands after a match.
category:
search
tags:
#search
#navigation
#motions
#normal-mode
How do I display the contents of only certain registers instead of all of them at once?
The :reg (alias :registers) command accepts a string of register names as its argument.
category:
registers
tags:
#registers
#ex-commands
#normal-mode
How do I delete each line matching a pattern along with a fixed number of lines that follow it?
Inside a :global command, .
category:
command-line
tags:
#ex-commands
#global
#delete
#editing
#command-line
How do I view all the files Vim would search when resolving include-based completions and lookups?
:checkpath! recursively walks through every file reachable via Vim's include path and displays the full include tree.
category:
navigation
tags:
#navigation
#include
#completion
#ex-commands
How do I push or pull a single diff hunk between buffers with a single keystroke in diff mode?
In Vim's diff mode, dp (diff put) and do (diff obtain) are single-keystroke shorthands for :diffput and :diffget.
category:
buffers-windows
tags:
#diff
#buffers-windows
#editing
#normal-mode
How do I sort lines by a secondary field while ignoring a common leading prefix?
The :[range]sort /regex/ command sorts lines while skipping the portion of each line that matches the regex.
category:
command-line
tags:
#ex-commands
#sorting
#command-line
#search
How do I write a Vim search pattern that matches text at or between mark positions?
Vim's \%'m regex atom matches the exact position of mark m in a search pattern.
category:
search
tags:
#search
#marks
#navigation
#ex-commands
#normal-mode
How do I set Vim options from a Lua config in Neovim using vim.opt?
Neovim's vim.
category:
config
tags:
#config
#neovim
#lua
#options
#editing
How do I use the filename under the cursor as a value in a Vim mapping or command?
The expand('') function returns the filename that Vim sees under the cursor — the same file that gf would open.
category:
command-line
tags:
#command-line
#ex-commands
#navigation
#editing
#motions
How do I log all Vim verbose output to a file to diagnose slow startup or plugin issues?
:set verbosefile=/tmp/vim.log verbose=9
Vim's verbosefile option redirects all verbose tracing output to a file on disk instead of printing it to the screen.
category:
config
tags:
#config
#debugging
#startup
#verbose
#ex-commands
How do I save screen space by merging the sign column into the line number column in Neovim?
Setting signcolumn=number tells Neovim to display signs (diagnostics, git hunks, breakpoints) inside the line number column instead of adding a dedicated extra
category:
config
tags:
#config
#signs
#lsp
#neovim
#line-numbers
How do I open a file under the cursor in a new split and jump to its line number in Vim?
F opens the filename under the cursor in a new horizontal split window and jumps to the line number that follows the filename.
category:
buffers-windows
tags:
#navigation
#buffers-windows
#windows
#editing
How do I inspect a Vim register's full details including its type (charwise, linewise, or blockwise) in Vimscript?
getreginfo('{reg}') (Vim 8.
category:
registers
tags:
#registers
#normal-mode
How do I use Neovim's built-in lazy iterator API to chain filter and map operations over a list?
vim.
category:
config
tags:
#ex-commands
How do I run an external command asynchronously from Neovim Lua and capture its output?
vim.system({cmd}, {opts}, callback)
vim.
category:
command-line
tags:
#command-line
#ex-commands