Skip to content

Vim Notes

Functions

Actions

Key Action
d Cut
x Delete
y Copy
p Paste after current character
U Undo all changes to current line
u Undo last change
r Replace highlighted character

Insert

Key Action
i Insert before current character
a Insert after current character
A Append to the end of the current line
o Insert in new line below current line
O Insert in new line above current line
R Replace mode
c[modifier] Replace range

Modifiers

Before actions

Key Action
w Apply action through next space
e Apply action through end of current word
$ Apply action through current line
[number] Apply action n times
Key Action
0 Go to beginning of line
gg Go to first character in file
G Go to first character in final line
% Navigate to matching close bracket or last open bracket
Key Action
/ Search forwards
? Search Backwards

Commands

Function Command
Find and Replace %s(across file)/[find]/[replace]/g(global)c(prompt)
Run in Shell ! [command]
Insert file r [file]
Insert command output r! [command]
Quit q
Force Quit q!
Write w
Set Option set [option] [value]

Options

Function Option
Ignore Case ic noic
Hightlight hlsearch nm
Show Partials is