How do I join multiple lines together with a custom separator like a comma?
Vim's J command joins lines with a single space, but sometimes you need a custom separator like a comma, pipe, or semicolon.
category:
editing
tags:
#editing
#ex-commands
#visual-mode
#substitution
#lines
How do I auto-complete words in insert mode without any plugins?
Vim has a powerful built-in completion system that requires zero plugins.
category:
editing
tags:
#editing
#insert-mode
#completion
#productivity
How do I autocomplete an entire line based on existing lines in the file?
The command triggers whole-line completion in insert mode.
category:
editing
tags:
#editing
#insert-mode
#completion
#productivity
How do I delete or change an entire paragraph of text in one motion?
The dap and dip commands use Vim's paragraph text objects to delete an entire block of contiguous text in a single motion.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#delete
#motions
How do I quickly delete all the arguments inside a function call?
The di( command deletes everything inside the nearest pair of parentheses without removing the parentheses themselves.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#delete
#code
How do I autocomplete file paths while typing in insert mode?
The command triggers filename completion in insert mode.
category:
editing
tags:
#editing
#insert-mode
#completion
#file-management
#productivity
How do I change the content between HTML tags without manually selecting it?
The cit command deletes everything between the nearest pair of HTML/XML tags and drops you into insert mode, ready to type the replacement.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#html
#tags
How do I quickly replace the text inside quotes without manually selecting it?
The ci" command deletes everything inside the nearest pair of double quotes and drops you into insert mode, ready to type the replacement.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#productivity
How do I quickly change an entire sentence in Vim?
The cis command deletes the entire sentence under the cursor and drops you into insert mode, ready to type a replacement.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#motions
#prose
How do I change text from the cursor up to a specific character?
The ct{char} command deletes everything from the cursor up to (but not including) the specified character and drops you into insert mode.
category:
editing
tags:
#editing
#motions
#normal-mode
#text-objects
#productivity
What is the difference between cw and ciw when changing a word?
The cw and ciw commands both change a word, but they behave differently depending on cursor position.
category:
editing
tags:
#editing
#text-objects
#motions
#normal-mode
#productivity
How do I swap two characters in Vim?
The xp command swaps the character under the cursor with the character to its right.
category:
editing
tags:
#editing
#normal-mode
How do I toggle the case of a character in Vim?
The ~ command toggles the case of the character under the cursor — uppercase becomes lowercase and vice versa — then advances the cursor one position to the
category:
editing
tags:
#editing
#normal-mode
#formatting
How do I undo the last change in Vim?
The u command undoes the last change you made in normal mode.
category:
editing
tags:
#editing
#undo-redo
#normal-mode
How do I uppercase a word in Vim?
The gUiw command converts the entire word under the cursor to uppercase.
category:
editing
tags:
#editing
#text-objects
#normal-mode
#formatting
How do I copy an entire line in Vim?
The yy command yanks (copies) the entire current line, including the newline character.
category:
editing
tags:
#editing
#registers
#yank
#normal-mode
How do I redo an undone change in Vim?
The (Ctrl+r) command redoes the last change that was undone with u.
category:
editing
tags:
#editing
#undo-redo
#normal-mode
How do I reformat a paragraph to fit a specific line width?
The gqip command reformats the current paragraph to fit within the configured textwidth.
category:
editing
tags:
#editing
#formatting
#text-objects
#normal-mode
How do I replace a single character without entering insert mode?
The r{char} command replaces the character under the cursor with {char} without ever entering insert mode.
category:
editing
tags:
#editing
#normal-mode
How do I open a new line above the cursor and start typing?
The O (uppercase) command opens a new blank line above the current line and places you in insert mode, ready to type.
category:
editing
tags:
#editing
#insert-mode
#normal-mode