Cursor movement
Basic movement
h,j,k,l
_ <– (underline)
- <– (minus)
gg
G
Wordwise movement
Lower case move until meta char | white space
Upper case move until whitespace
- Start of word (moving forward)
w
W
- End of word (moving forward)
e
E
- Start of word (moving backward)
b
B
- End of word (moving backward)
ge
gE
Sentencewise movement
- Start of line (ignore all indent: unlike ‘-‘)
0 <– (number)
- Start of sentence (non-blank)
$
Pagewise movement
- Move topmost from current page (high)
H
- Move middle from current page (middle)
M
- Move lowest from current page (low)
L
- Start line of Previous page (back)
ctrl + b
- Start line of Next page (front)
ctrl + f
- Start line of half-page down
ctrl + d
- Start line of half-page up
ctrl + u
linewise movement
:[number]
Blockwise movement
- Move to either pair of block brackets (), {}, [], <>
%
- Move to { (moving forward)
If none, move bottom of page
]]
- Move to { (moving backward)
If none, move top of page
[[
- Move to } (moving forward)
If none, move bottom of page
][
- Move to } (moving backward)
If none, move top of page
[]
Edit
Insertion
i
a
I <-(alphabet upper i)
A
o <-(alphabet lower o)
- Append up on previous line
O <-(alphabet upper o)
Deletetion
- Delete char at cursor (act like ‘del’ key)
x
- Delete char b4 cursor (act like ‘backspace’ key)
X
- Delete from cursor to end of line
D
Replace
s
- Delete line and insert ( same as ‘cc’)
S
- Delete from cursor to end of line and insert
C
r[char]
R
Multi-line operation
[operator][count][motion]
operator
d
dd
y
yy
c
cc
- Make upper / lower / swap case
gU
gu
~
- Increment / Decrement number
ctrl + a
ctrl + x
>
<
- Indent paragraph right / left
>}
<}
.
motion
File operation
Basic operation
u
ctrl + r
gt
gT