Vim
A lightweight text editor featuring modal operation, unlocking true productivity with overwhelming editing speed once mastered
i
Insert mode
Starts character input from cursor position.
π‘ Hint: insert
I
Insert at beginning
Starts input from the beginning of the line.
π‘ Hint: Capital I for beginning
a
Append mode
Starts input after cursor position.
π‘ Hint: append
A
Append at end
Starts input from the end of the line.
π‘ Hint: Capital A for end
o
Open line below
Opens a new line below and enters insert mode.
π‘ Hint: open
O
Open line above
Opens a new line above and enters insert mode.
π‘ Hint: Capital O for above
v
Visual mode
Starts character-wise selection.
π‘ Hint: visual
V
Visual line mode
Starts line-wise selection.
π‘ Hint: Capital V for line
Ctrl+v
Visual block mode
Starts block-wise selection.
π‘ Hint: Ctrl+v for block
Esc
Normal mode
Returns to normal (command) mode.
π‘ Hint: Escape
Ctrl+[
Normal mode (Ctrl)
Same as Esc, returns to normal mode.
π‘ Hint: Ctrl+[ as Esc alternative
h
Move left
Moves cursor one character left.
π‘ Hint: h is leftmost
j
Move down
Moves cursor one line down.
π‘ Hint: j looks like down arrow
k
Move up
Moves cursor one line up.
π‘ Hint: kick up
l
Move right
Moves cursor one character right.
π‘ Hint: l is rightmost
w
Next word
Moves to the beginning of next word.
π‘ Hint: word
b
Previous word
Moves to the beginning of previous word.
π‘ Hint: backward
e
End of word
Moves to the end of current or next word.
π‘ Hint: end
0
Beginning of line
Moves to the beginning of line (column 0).
π‘ Hint: 0 is start position
^
First character of line
Moves to the first non-blank character of line.
π‘ Hint: ^ points to line start
$
End of line
Moves to the end of line.
π‘ Hint: $ represents end
g+g
Go to top
Goes to the first line of file.
π‘ Hint: go go to top
G
Go to bottom
Goes to the last line of file.
π‘ Hint: Capital G for last
f+ζε
Find character
Moves to specified character in line.
π‘ Hint: find
F+ζε
Find character backward
Moves backward to specified character in line.
π‘ Hint: Capital F for backward
%
Matching bracket
Moves to matching bracket.
π‘ Hint: % represents pair
Ctrl+u
Half page up
Scrolls half page up.
π‘ Hint: up
Ctrl+d
Half page down
Scrolls half page down.
π‘ Hint: down
z+z
Center cursor
Scrolls to center cursor line on screen.
π‘ Hint: zoom to center
x
Delete character
Deletes character at cursor.
π‘ Hint: extract
d+d
Delete line
Deletes the current line.
π‘ Hint: delete double
d+w
Delete word
Deletes word from cursor.
π‘ Hint: delete word
D
Delete to end
Deletes from cursor to end of line.
π‘ Hint: Capital D to end
y+y
Yank line
Copies the current line.
π‘ Hint: yank
p
Paste after
Pastes after cursor position.
π‘ Hint: paste
P
Paste before
Pastes before cursor position.
π‘ Hint: Capital P for before
u
Undo
Undoes the last operation.
π‘ Hint: undo
Ctrl+r
Redo
Redoes the undone operation.
π‘ Hint: redo
.
Repeat command
Repeats the last change command.
π‘ Hint: Period for repeat
r+ζε
Replace character
Replaces character at cursor.
π‘ Hint: replace
R
Replace mode
Enters replace mode to overwrite text.
π‘ Hint: Capital R for replace mode
J
Join lines
Joins current line with next line.
π‘ Hint: Join
>+>
Indent
Indents the current line.
π‘ Hint: > shifts right
<+<
Outdent
Outdents the current line.
π‘ Hint: < shifts left
~
Toggle case
Toggles case of character at cursor.
π‘ Hint: ~ (tilde) toggles
/
Search forward
Searches forward in file.
π‘ Hint: / is search slash
?
Search backward
Searches backward in file.
π‘ Hint: ? for reverse search
n
Next search result
Goes to next search result.
π‘ Hint: next
N
Previous search result
Goes to previous search result.
π‘ Hint: Capital N for previous
*
Search word under cursor
Searches forward for word under cursor.
π‘ Hint: * for highlight search
#
Search word backward
Searches backward for word under cursor.
π‘ Hint: # for backward search
:+w
Save file
Saves the current file.
π‘ Hint: write
:+q
Quit
Quits Vim (fails if there are unsaved changes).
π‘ Hint: quit
:+q+!
Force quit
Quits Vim discarding changes.
π‘ Hint: quit + ! to force
:+w+q
Save and quit
Saves file and quits Vim.
π‘ Hint: write quit
Z+Z
Save and quit (ZZ)
Saves file and quits Vim (no command mode needed).
π‘ Hint: ZZ for quick exit
:+e+ +γγ‘γ€γ«ε
Edit file
Opens specified file.
π‘ Hint: edit
:+%+s+/+ε+/+εΎ+/+g
Substitute all
Substitutes text in entire file.
π‘ Hint: substitute
:+ζ°ε
Go to line
Goes to specified line number.
π‘ Hint: :line number to go
Ctrl+a
Increment number
Increments number at cursor by 1.
π‘ Hint: add
Ctrl+x
Decrement number
Decrements number at cursor by 1.
π‘ Hint: extract
:+!+γ³γγ³γ
Execute command
Executes shell command.
π‘ Hint: ! for external
q+ζε
Record macro
Starts recording macro to specified letter.
π‘ Hint: q to record
q
Stop recording
Stops recording macro.
π‘ Hint: q to stop
@+ζε
Play macro
Plays macro recorded to specified letter.
π‘ Hint: @ to play
:+s+p+l+i+t
Split horizontal
Splits window horizontally.
π‘ Hint: split
:+v+s+p+l+i+t
Split vertical
Splits window vertically.
π‘ Hint: vertical split
Ctrl+w+h
Window left
Moves to left window.
π‘ Hint: window + h (left)
Ctrl+w+l
Window right
Moves to right window.
π‘ Hint: window + l (right)