How do I make right-click extend a selection instead of opening a popup menu?
:set mousemodel=extend
If you use the mouse occasionally in Vim, mousemodel=extend makes selection behavior much more predictable.
:set mousemodel=extend
If you use the mouse occasionally in Vim, mousemodel=extend makes selection behavior much more predictable.
O (visual block mode)
In visual block mode (), pressing O (uppercase) moves your cursor to the other end of the current line — letting you expand or contract the block's horizontal
v3aw
In visual mode, repeating text object motions progressively expands the selection.
"*p
The register represents the primary selection (middle-click paste in X11).
"_dP or use "0p
When pasting over a selection, the replaced text overwrites the unnamed register.
Va{ or Vi{
The a{ (around braces) and i{ (inside braces) text objects combined with visual mode let you instantly select an entire function body or code block, regardless
visual-mode #visual-mode #text-objects #code-navigation #selection
r{char} in visual mode
In visual mode, pressing r followed by a character replaces every character in the selection with that single character.
o (in visual mode)
While in visual mode, pressing o swaps the cursor to the opposite end of the selection.
v + repeated iw/aw/i(/a(/ip/ap
Once you enter visual mode, you can progressively expand your selection by typing increasingly larger text objects.
visual-mode #visual-mode #text-objects #editing #selection #productivity