vim
Essential Vim shortcuts for navigation, selecting text, editing and more.
Navigation
Move efficiently within a file using these commands.
Move to beginning of line
Jumps to the first character of the current line.
Move to end of line
Jumps to the last character of the current line.
Move to a specific line
Jumps to a specified line number.
Move forward one word
Jumps to the beginning of the next word.
Move backward one word
Jumps to the beginning of the previous word.
Move to matching bracket
Jumps between matching parentheses, brackets, or braces.
Tab (add indent)
In insert mode, increases the indentation level.
Un-tab (remove indent)
In insert mode, decreases the indentation level.
Selecting Text
Commands for selecting, deselecting, and highlighting text, lines, or the entire file.
Select text
Starts visual mode to select text character by character.
Select line
Selects entire lines instead of characters.
Select entire file
Selects all text in the file.
Deselect selection
Exits visual mode and clears selection.
Editing
Modify text with these essential Vim commands.
Insert mode
Enters insert mode to start typing.
Escape insert mode
Escapes the insert mode.
Replace a character
Replaces the character under the cursor.
Change a word
Deletes the word under the cursor and enters insert mode.
Delete a character
Deletes the character under the cursor.
Delete a word
Deletes the word under the cursor.
Copy
Copies the selected text or the current line.
Cut
Cuts the selected text or the current line.
Paste
Pastes the last cut or copied text at the cursor position.
Copy to system clipboard
Copies the selected text or current line to the system clipboard.
Cut to system clipboard
Cuts the selected text or current line to the system clipboard.
Paste from system clipboard
Pastes text from the system clipboard into Vim.
Undo last change
Reverts the last edit.
Redo last undone change
Reapplies the last undone change.
Search and Replace
Find text and perform replacements efficiently.
Search for a word
Finds the next occurrence of a word in the file.
Search backward for a word
Finds the previous occurrence of a word in the file.
Repeat last search
Moves to the next match of the last search.
Replace text globally
Replaces all occurrences of a word with another in the whole file.
Replace text in the current line
Replaces all occurrences of a word in the current line.
Exiting Vim
How to quit Vim safely.
Save and exit
Writes changes to file and quits.
Quit without saving
Exits Vim without saving changes.
Save without exiting
Saves the file but stays in Vim.
Windows and Tabs
Manage multiple files and workspaces.
Open a new tab
Opens a new tab in Vim.
Switch between tabs
Moves to the next or previous tab.
Split window horizontally
Splits the window into two horizontal panes.
Split window vertically
Splits the window into two vertical panes.
Switch between windows
Moves the cursor between split windows.
Miscellaneous
Other useful Vim commands.
Show line numbers
Displays line numbers in the editor.
Hide line numbers
Hides line numbers in the editor.
Enable syntax highlighting
Turns on syntax highlighting.
Disable syntax highlighting
Turns off syntax highlighting.