How do I execute a single normal mode command inside a Neovim terminal buffer without fully leaving terminal mode?
In a Neovim terminal buffer, exits to normal mode permanently.
category:
buffers-windows
tags:
#terminal
#buffers-windows
#insert-mode
#neovim
#normal-mode
How do I move all lines matching a pattern to the end of a file?
The :g (global) command combined with :m (move) relocates all matching lines to a specified destination.
category:
command-line
tags:
#command-line
#ex-commands
#global
#editing
#organization
How do I prepend a value to the beginning of a comma-separated Vim option like path or wildignore?
Vim's :set option^=value operator prepends a value to the front of a list-style option, giving it the highest priority.
category:
config
tags:
#config
#ex-commands
#settings
#advanced
How do I open a file in Netrw in a vertical split instead of the current window?
When browsing files in Vim's built-in file manager (Netrw), pressing v on any file opens it in a vertical split to the right.
category:
plugins
tags:
#buffers-windows
#navigation
#editing
How do I find a file by name in Vim's path and open it in a new tab?
:tabfind is the tab-aware counterpart to :find.
category:
buffers-windows
tags:
#buffers
#tabs
#navigation
#ex-commands
How do I search for the word under the cursor as a substring, not a whole word?
The and # commands search for the exact whole word under the cursor (with word boundaries \).
category:
search
tags:
#search
#navigation
#normal-mode
How do I open a floating window showing diagnostic details at the cursor using a built-in Neovim key?
Neovim 0.
category:
buffers-windows
tags:
#diagnostics
#lsp
#floating-window
#neovim
#buffers
#windows
How do I set a different statusline for a specific buffer or window?
:setlocal statusline=%f\ %m\ %y\ [%l/%L]
The :setlocal statusline command lets you override the global statusline for a specific window.
category:
config
tags:
#config
#statusline
#ex-commands
#buffers
How do I duplicate every line matching a pattern, placing a copy directly below each one?
Combining :global with the :t (copy) command and the .
category:
command-line
tags:
#editing
#ex-commands
#search
#command-line
How do I edit a recorded macro by modifying it as text in a buffer?
Recorded macros are stored as plain text in registers, but editing them by re-recording is tedious for complex sequences.
category:
macros
tags:
#macros
#registers
#editing
How do I assign a macro to a register directly from the command line without recording it?
You can assign a string directly to any register using :let @{reg} = '.
category:
macros
tags:
#macros
#registers
#ex-commands
How do I open any file in a project by partial name without a fuzzy finder plugin in Vim?
Vim's built-in :find command supports recursive glob patterns, making it possible to locate and open files anywhere in a project without installing a fuzzy find
category:
navigation
tags:
#navigation
#ex-commands
#buffers
#completion
How do I schedule a Lua callback to run after a delay in Neovim for deferred or non-blocking initialization?
vim.
category:
config
tags:
#neovim
#lua
#config
#async
#initialization
How do I center-align a line or range of lines to a specific column width in Vim?
Vim has a built-in :center command that pads lines with leading spaces to visually center them within a given column width.
category:
command-line
tags:
#formatting
#text-alignment
#ex-commands
#editing
How do I append keystrokes to an existing macro without re-recording it?
If a recorded macro is almost correct but missing a final step, re-recording from scratch is slow and error-prone.
category:
macros
tags:
#macros
#registers
#automation
#workflow
How do I search for a pattern only within a visual selection?
The \%V pattern atom restricts a search to the region spanned by the last visual selection.
category:
search
tags:
#search
#visual-mode
#patterns
#normal-mode
How do I center or right-align text to a specific width in Vim?
Vim has built-in text alignment commands that adjust lines relative to a specified width.
category:
editing
tags:
#editing
#alignment
#formatting
#text
How do I programmatically set a register's content or pre-load a macro using setreg()?
The setreg() VimScript function lets you populate any register with arbitrary content directly from the command line or a script — no recording required.
category:
registers
tags:
#registers
#macros
#vimscript
#normal-mode
How do I send a range of lines as stdin to a shell command without modifying the buffer?
The :[range]w !{cmd} command writes a range of lines to the standard input of a shell command, leaving the buffer completely unchanged.
category:
command-line
tags:
#ex-commands
#command-line
#shell
#normal-mode
How do I execute a macro on each quickfix match and write files only when changed?
When you already have a precise quickfix list, :cdo is one of the safest ways to run a macro only where it matters.
category:
macros
tags:
#macros
#quickfix
#command-line
#automation