How do I scroll the view horizontally by half a screen width in Vim?
zH and zL scroll the viewport horizontally by half a screen width, letting you navigate wide content efficiently when wrap is disabled.
category:
navigation
tags:
#navigation
#scrolling
#horizontal
#nowrap
#motions
How do I switch from typing a command to the full command-line window so I can edit it with all normal Vim keys?
<C-f> (from command-line)
When you are already in the middle of typing a command (after pressing :) and realize you need to compose something complex — a long substitution, a multi-pip
category:
command-line
tags:
#command-line
#editing
#normal-mode
How do I run an interactive git blame inside Vim?
The vim-fugitive plugin by Tim Pope provides a powerful interactive :Git blame that goes far beyond the basic command-line git blame.
category:
plugins
tags:
#plugins
#fugitive
#git
#blame
#history
How do I execute the current line as a shell command and insert the output?
The :.
category:
command-line
tags:
#editing
#ex-commands
#shell
#filtering
#productivity
How do I view a side-by-side Git diff of staged changes inside Vim?
The vim-fugitive plugin provides :Gdiffsplit (and its vertical variant :Gvdiffsplit) to open a side-by-side diff view comparing the working tree version of a fi
category:
plugins
tags:
#plugins
#fugitive
#git
#diff
#staging
How do I quickly comment and uncomment code in Vim with a plugin?
The vim-commentary plugin by Tim Pope provides a minimal yet powerful way to toggle comments in any programming language.
category:
plugins
tags:
#plugins
#commentary
#commenting
#editing
#normal-mode
How do I use a macro to generate a numbered list automatically?
By recording a macro that duplicates a line and increments its number, you can generate a numbered list of any length with a single replay command.
category:
macros
tags:
#macros
#editing
#normal-mode
#automation
#productivity
How do I navigate undo branches to recover changes that were overwritten by a new edit?
Vim doesn't have a simple linear undo stack — it maintains a full undo tree with branches.
category:
editing
tags:
#editing
#undo-redo
#normal-mode
#advanced
#productivity
How do I rapidly generate HTML boilerplate using abbreviations in Vim?
The emmet-vim plugin brings the full power of Emmet (formerly Zen Coding) to Vim, letting you type a short CSS-like abbreviation and expand it into a complete H
category:
plugins
tags:
#plugins
#emmet
#html
#css
#editing
#insert-mode
How do I quickly toggle options and navigate lists using bracket mappings in Vim?
The vim-unimpaired plugin by Tim Pope provides a consistent set of bracket-based mappings for toggling Vim options, navigating paired lists, and performing comm
category:
plugins
tags:
#plugins
#unimpaired
#navigation
#options
#workflow
How do I fold and unfold sections of code to hide details I'm not working on?
Vim's folding system lets you collapse blocks of code into a single line, hiding the details so you can focus on the structure.
category:
editing
tags:
#editing
#folding
#navigation
#normal-mode
#productivity
How do I select or operate on a block of code based on its indentation level in Vim?
The vim-indent-object plugin by Michael Smith adds text objects based on indentation level, giving you ii (inner indent) and ai (an indent) to select, delete, c
category:
plugins
tags:
#plugins
#indent
#text-objects
#editing
#python