How do I append text to the end of multiple lines at once using visual block mode?
Visual block mode combined with $A lets you append text to the end of multiple lines simultaneously, even when those lines have different lengths.
category:
visual-mode
tags:
#editing
#visual-mode
#block-mode
#productivity
#insert-mode
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 open all loaded buffers into split windows at once?
The :sball command (short for split all) opens every loaded buffer in its own horizontal split window in one shot.
category:
buffers-windows
tags:
#buffers-windows
#buffers
#windows
#tabs
How do I insert the same text on multiple lines at once?
Visual block mode combined with I lets you insert the same text at the beginning of multiple lines simultaneously.
category:
visual-mode
tags:
#visual-mode
#editing
#insert-mode
How do I run the same Ex command in every open window at once?
:windo {cmd} executes an Ex command in every window in the current tab page, cycling through each one and applying the command before returning focus to the ori
category:
buffers-windows
tags:
#windows
#buffers
#ex-commands
#buffers-windows
How do I turn off diff mode in all windows at once after comparing files?
The :diffoff! command exits diff mode in every window simultaneously.
category:
buffers-windows
tags:
#buffers-windows
#ex-commands
#editing
How do I step through the files in my argument list one at a time?
When Vim is opened with multiple files (e.
category:
command-line
tags:
#buffers-windows
#ex-commands
#navigation
#editing
How do I paste the contents of a register at a specific line number without moving my cursor?
How it works The :put Ex command pastes the contents of a register after a specified line.
category:
editing
tags:
#editing
#registers
#ex-commands
How do I make Vim's search stop at the end of the file instead of wrapping back to the top?
By default Vim's wrapscan option is enabled, which causes / and ? searches to wrap silently from the end of the file back to the beginning (and vice versa).
category:
config
tags:
#search
#config
#options
How do I peek at a function definition without leaving my current window?
:ptag {identifier} opens a small preview window showing the definition of the given tag, while keeping your cursor in the original window.
category:
navigation
tags:
#navigation
#tags
#windows
How do I save all modified buffers at once without switching to each one?
When working across multiple files, you often have unsaved changes in several buffers.
category:
command-line
tags:
#buffers
#ex-commands
#editing
How do I profile Vim functions at runtime to find what's making it slow?
:profile start /tmp/profile.log | profile func *
When Vim feels sluggish during editing (not just at startup), the :profile command lets you measure the execution time of every function call.
category:
config
tags:
#ex-commands
#config
#debugging
How do I open the current file in a preview window at a specific pattern?
When you need a second read-only view of the same file, opening more normal splits can disrupt your working layout.
category:
buffers-windows
tags:
#buffers
#windows
#preview
#workflow
How do I search for multiple alternative patterns at once in Vim?
How it works The \ operator in Vim's search pattern works like a logical OR, letting you match any one of several alternatives.
category:
search
tags:
#search
#normal-mode
#ex-commands
How do I display a single shared status line at the bottom of Neovim instead of one per split window?
Neovim 0.
category:
config
tags:
#config
#buffers-windows
How do I run a command across all open buffers at once?
:bufdo %s/old/new/ge | update
The :bufdo command executes an Ex command in every loaded buffer.
category:
buffers-windows
tags:
#buffers
#ex-commands
#editing
#substitution
How do I delete all lowercase marks in the current buffer at once?
Marks accumulate as you work — ma, mb, mc and so on record positions for later jumps.
category:
navigation
tags:
#navigation
#marks
#editing
#ex-commands
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 debug a Vim macro one command at a time?
Recorded macros are powerful, but when one keystroke goes wrong they can fail fast and leave confusing state behind.
category:
macros
tags:
#macros
#debugging
#normal-mode
#workflow
How do I open netrw in a left sidebar rooted at the current file's directory?
When you are editing deep in a project, opening netrw from the working directory often puts you in the wrong place.
category:
plugins
tags:
#plugins
#buffers
#windows
#navigation