How do I stop Vim from replacing long lines with rows of '@' signs and show as much text as possible instead?
:set display+=lastline,truncate
By default, when a line is too long to fit in the window, Vim fills the remaining rows with @ characters to indicate the line continues off-screen.
category:
config
tags:
#config
#display
#long-lines
#wrap
#visual
How do I hide or replace the ~ characters that appear at the end of a buffer?
By default, Vim fills empty lines after the end of a buffer with ~ characters.
category:
config
tags:
#config
#display
#visual
How do you select all lines at the same indentation level?
vii with indent-object plugin
The vim-indent-object plugin provides ii (inner indent) and ai (around indent) text objects.
category:
visual-mode
tags:
#visual
#indent
#select
How do you select from cursor to a mark in visual mode?
Press v for visual mode, then 'a to extend the selection to mark a.
category:
visual-mode
tags:
#visual
#select
#mark
How do you increment a column of numbers in visual mode?
Select numbers with visual block mode , then press to increment all selected numbers by 1.
category:
visual-mode
tags:
#visual
#increment
#numbers
How do you paste over selected text without losing the yanked text?
Use "_dP which deletes the selection into the black hole register and pastes before.
category:
visual-mode
tags:
#visual
#paste
#preserve
How do you select a rectangular column of text?
Press for visual block mode, then use movement keys to select a rectangle.
category:
visual-mode
tags:
#visual
#block
#column
How do you select to end of line for multiple lines in block mode?
In visual block mode, press $ to extend each line's selection to its end, even if lines have different lengths.
category:
visual-mode
tags:
#visual
#block
#end-of-line
How do you surround a visual selection with characters?
With the vim-surround plugin, select text visually and press S) to wrap with parentheses.
category:
visual-mode
tags:
#visual
#surround
#wrap
How do you select from cursor to end of line in visual mode?
Press v to enter character-wise visual mode, then $ to extend selection to the end of the line (excluding the newline).
category:
visual-mode
tags:
#visual
#select
#end-line
How do you select text inside HTML/XML tags?
Press vit to select the inner content of the nearest HTML/XML tag.
category:
visual-mode
tags:
#visual
#select
#tags
How do you add line numbers to visually selected lines?
Select lines visually, then run :'!nl -ba to pipe through the nl command which prepends line numbers to each selected line.
category:
visual-mode
tags:
#visual
#number
#lines
How do you filter a visual selection through an external command?
Select lines, then type ! which auto-expands to :'!.
category:
visual-mode
tags:
#visual
#filter
#command
How do you format (rewrap) a visual selection to textwidth?
Select text with v or V, then press gq to format the selection according to textwidth.
category:
visual-mode
tags:
#visual
#format
#wrap
How do you replace a column of characters in visual block mode?
Enter visual block with , select a column with j, press r followed by the replacement character.
category:
visual-mode
tags:
#visual
#block
#replace
How do you change (delete and enter insert mode) for visual selection?
Select text visually, then press c to delete the selection and enter insert mode.
category:
visual-mode
tags:
#visual
#change
#delete
How do you delete a visual selection?
Select text visually and press d to delete the selection.
category:
visual-mode
tags:
#visual
#delete
#cut
How do you append text to multiple lines using visual block mode?
Enter visual block with , select lines with j, press A to append after the block.
category:
visual-mode
tags:
#visual
#block
#append
How do you insert text on multiple lines using visual block mode?
Enter visual block with , select lines with j, press I to insert before the block.
category:
visual-mode
tags:
#visual
#block
#insert
How do you create a numbered sequence using visual block mode?
Select a column of identical numbers with , then press g to create an incrementing sequence (1,2,3.
category:
visual-mode
tags:
#visual
#block
#sequence