How do I change surrounding quotes or brackets from one type to another with vim-surround?
The vim-surround plugin (by Tim Pope) adds three powerful operators for working with surrounding delimiters — quotes, brackets, parentheses, and HTML tags.
category:
plugins
tags:
#plugins
#text-objects
#editing
How do I recover text from older deletions using Vim's numbered registers?
Vim automatically stores your deletion history in numbered registers "1 through "9.
category:
registers
tags:
#registers
#editing
#normal-mode
#undo-redo
How do I replace the next search match and repeat it easily with dot?
The cgn command combines the change operator with the gn motion to change the next occurrence of your last search pattern.
category:
editing
tags:
#editing
#search
#repeat
#normal-mode
#productivity
How do I change text from the cursor to the end of the line?
The C command deletes everything from the cursor position to the end of the line and places you in insert mode.
category:
editing
tags:
#editing
#normal-mode
#insert-mode
How do I change one type of surrounding delimiter to another with vim-surround?
The cs command from the vim-surround plugin lets you swap one type of surrounding delimiter for another in a single motion.
category:
plugins
tags:
#plugins
#editing
#text-objects
#surround
How do I select text character by character in Vim?
The v command enters character-wise visual mode, letting you select text one character at a time.
category:
visual-mode
tags:
#visual-mode
#normal-mode
How do I record a self-repeating recursive macro that automatically stops when it hits an error?
A recursive macro is one that calls itself at the end of its own recording.
category:
macros
tags:
#macros
#registers
#normal-mode
How do I access the text from my last insert session?
The .
category:
registers
tags:
#registers
#editing
#normal-mode
How do I copy from the cursor to the end of the line?
The y$ command yanks (copies) text from the cursor position to the end of the line.
category:
editing
tags:
#editing
#normal-mode
How do I copy text to the system clipboard in Vim?
The "+y command yanks (copies) text into the system clipboard register, making it available to paste in other applications outside of Vim.
category:
registers
tags:
#registers
#yank
#editing
#normal-mode
How do I incrementally expand or shrink a selection based on syntax tree nodes using nvim-treesitter?
nvim-treesitter's incremental selection module lets you grow and shrink your visual selection one syntax node at a time.
category:
plugins
tags:
#visual-mode
#plugins
#text-objects
#editing
How do I change from the cursor to the end of the word?
The ce command changes from the cursor position to the end of the current word.
category:
editing
tags:
#editing
#normal-mode
#motions
How do I re-insert the text I typed in the previous insert session?
While in insert mode, pressing re-inserts the exact text you typed during your previous insert session.
category:
editing
tags:
#insert-mode
#editing
#registers
How do I delete from the cursor to the end of the line?
The D command deletes everything from the cursor position to the end of the current line.
category:
editing
tags:
#editing
#delete
#normal-mode
How do I change the case of a specific column of text using visual block mode?
Visual block mode lets you select rectangular regions of text, which means you can target a specific column and apply case changes only to that area.
category:
visual-mode
tags:
#visual-mode
#editing
#text-objects
#formatting
How do I jump to the next section or function definition in Vim?
The ]] motion jumps forward to the next line that starts with { in the first column, which is typically the beginning of a C-style function or section.
category:
navigation
tags:
#navigation
#motions
#normal-mode
How do I jump back in the jumplist and automatically reveal and center the destination?
Jumping backward with is fast, but in folded or dense files it can land you in a collapsed section or near the edge of the screen, forcing extra cleanup keystro
category:
navigation
tags:
#navigation
#jumplist
#folding
#normal-mode
How do I append text to the end of multiple lines that have different lengths?
Visual block mode normally selects a fixed-width column, which makes appending tricky when lines have different lengths.
category:
visual-mode
tags:
#visual-mode
#editing
#insert-mode
How do I target outer nested brackets using counted text objects?
Vim text objects accept a count prefix that lets you target outer layers of nested delimiters.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#advanced
How do I run a single normal mode command without fully leaving insert mode?
Pressing while in insert mode lets you execute exactly one normal mode command and then automatically returns you to insert mode.
category:
editing
tags:
#insert-mode
#editing
#normal-mode