Operators
Usage
| Shortcut |
Description |
d |
w |
| Operator |
Motion |
Combine operators with motions to use them
Available Operators
| Shortcut |
Description |
d |
Delete |
y |
Yank (copy) |
c |
Change (delete then insert) |
p |
Paste |
= |
Formats code |
g~ |
Toggle case |
gU |
Uppercase |
gu |
Lowercase |
> |
Indent right |
< |
Indent left |
! |
Filter through external program |
Examples
| Combination |
Description |
dd |
Delete current line |
dj |
Delete two lines |
dw |
Delete to next word |
db |
Delete to beginning of word |
dfa |
Delete until a char |
d/hello |
Delete until hello |
cc |
Change current line, synonym with S |
yy |
Copy current line |
>j |
Indent 2 lines |
ggdG |
Delete a complete document |
gg=G |
Indent a complete document |
ggyG |
Copy a whole document |
Counts
[count] <operator> <motion>
<operator> [count] <motion>
| Combination |
Description |
2dd |
Delete 2 lines |
6yy |
Copy 6 lines |
d3w |
Delete 3 words |
d5j |
Delete 5 lines downwards |
>4k |
Indent 4 lines upwards |