How do I select the text I just pasted or changed?
`[v`]
The ` [v] sequence visually selects the exact region of text that was last changed, pasted, or yanked into the buffer.
visual-mode #editing #visual-mode #marks #paste #productivity
`[v`]
The ` [v] sequence visually selects the exact region of text that was last changed, pasted, or yanked into the buffer.
visual-mode #editing #visual-mode #marks #paste #productivity
=
Pressing = in visual mode auto-indents the selected lines according to Vim's built-in indentation rules.
visual-mode #editing #visual-mode #indentation #formatting #productivity
<C-v>jj$A text<Esc>
Visual block mode combined with $A lets you append text to the end of multiple lines simultaneously, even when those lines have different lengths.
visual-mode #editing #visual-mode #block-mode #productivity #insert-mode
<C-v>jjjI
Visual block mode combined with I lets you insert the same text at the beginning of multiple lines simultaneously.
<C-v>
The (Ctrl+v) command enters visual block mode, which lets you select a rectangular column of text across multiple lines.
vat
The vat command visually selects the nearest enclosing HTML or XML tag and all of its contents, including the opening and closing tags themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode
V
The V (uppercase) command enters visual line mode, which selects the entire current line.
vi{
The vi{ command visually selects everything inside the nearest pair of curly braces {}, without selecting the braces themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode
vip
The vip command visually selects the inner paragraph — all contiguous non-blank lines surrounding the cursor.
visual-mode #visual-mode #text-objects #editing #normal-mode
:'<,'>sort
The :'sort command sorts the currently selected lines in visual mode alphabetically.
gv
The gv command reselects the exact same area that was last selected in visual mode.
g<C-a>
The g command increments numbers across a visual selection so that each subsequent line gets a progressively higher value.
vi"
The vi" command visually selects all text inside double quotes, without including the quotes themselves.
visual-mode #visual-mode #text-objects #editing #normal-mode