How do I join a specific number of lines at once without pressing J multiple times?
{count}J
The J command joins the current line with the line below, adding a space between them.
870 results for "it at"
{count}J
The J command joins the current line with the line below, adding a space between them.
\%[abc]
The \%[.
:reg a b c
The :reg (alias :registers) command accepts a string of register names as its argument.
mf and D (in netrw)
Vim's built-in file browser netrw (opened with :Explore or :Ex) supports a full file management workflow beyond simple navigation.
:argdo norm @a | update
Combining :argdo with :norm @a lets you apply a recorded macro to every file in Vim's argument list — a powerful pattern for bulk refactoring across a project
<C-l> during / search
When searching with incsearch enabled, Vim highlights matches as you type.
:argdo normal @a
The :argdo command applies any Ex command to every file in the argument list.
:tabdo
The :tabdo {cmd} command executes an Ex command in each open tab page sequentially, visiting every tab and running the command there.
buffers-windows #tabs #buffers #ex-commands #buffers-windows
:Gedit HEAD~3:%
The vim-fugitive plugin lets you open any version of any file from your Git history directly in a Vim buffer using the :Gedit command.
:norm
:normal (abbreviated :norm) executes a sequence of normal-mode keystrokes on each line of an address range.
:argdo normal @q | update
The :argdo command runs a command in every file in the argument list.
macros #macros #batch-editing #multi-file #ex-commands #workflow
:tab ball
:tab ball (short for :tab sball, "split all buffers in tabs") opens every listed buffer in its own tab page in a single command.
:cfdo %s/old/new/ge | update
When you grep across your project and want to perform a search-and-replace on every file that matched, :cfdo is the most efficient approach.
command-line #quickfix #substitute #search #ex-commands #editing
:g/pattern/Commentary
vim-commentary exposes Commentary as an Ex command that toggles comments on the current line, making it composable with Vim's :global command.
:'<,'>center
After making a visual selection, typing : automatically inserts ' to scope the command to the selection.
visual-mode #visual-mode #formatting #ex-commands #indentation
:profile start profile.log | profile func *
When Vim feels sluggish during editing—not just at startup—you need runtime profiling to pinpoint which functions are consuming the most time.
config #profiling #debugging #config #ex-commands #performance
<C-e> / <C-y> (insert mode)
In insert mode, copies the character directly below the cursor (from the next line) and copies the character directly above (from the previous line).
:Subvert
The vim-abolish plugin's :Subvert command (abbreviated :S) substitutes a word across all its case variants simultaneously.
zR and zM
When working with a heavily folded file, manually opening or closing each fold is tedious.
d3aw
Most Vim users know you can put a count before an operator (3dw) or use a text object once (daw).
editing #text-objects #editing #delete #normal-mode #motions