|
|
k
|
|
|
j
|
|
|
h
|
|
|
l
|
|
Move Forward One "Word"
Forward to Whitespace |
w
W |
|
Move Forward to End of "Word"
Same but to Whitespace |
e
E |
|
Move Backward one word (start)
Move Backward to whitespace |
b
B |
|
Page Down One Page
|
<Ctrl-f>
|
|
Page Up One Page
|
<Ctrl-b>
|
|
Move to End of Line
|
$
|
|
Move to beginning of Line (first character)
|
^
|
|
Move to beginning of line
|
0
|
|
Move to top of file
|
gg
|
|
Move to bottom of file
|
G
|
|
Move to line <num>
|
<num>G 6G
|
|
Find next occurrence of <char>
Find previous occurrence of <char> |
f<char>
F<char> |
|
'Till the next occurence of <char>
'Till the previous occurrence of <char> |
t<char>
T<char> |
|
Move cursor to matching pair () {} []
|
%
|
|
Move cursor to top of screen
|
H (Home)
|
|
Move cursor to middle of screen
|
M
|
|
Move cursor to bottom of screen
|
L (Last)
|
|
Re-position cursor to the top
|
zt
|
|
Re-position cursor to the middle
|
zz
|
|
Re-position cursor to bottom
|
zb
|
|
Make mark
|
m[a-zA-Z]
|
|
Go to line with mark
|
'[a-zA-Z]
|
|
Go to actual column mark
|
`[a-zA-Z]
|
|
:marks
|
Show marks
|
|
Insert before current position
Insert at beginning of line (first char) |
i
I |
|
Insert after current position
Insert at the end of line |
a
A |
|
Insert new line below current line
Insert new line above current line |
o
O |
|
Read Text from <source> (source can be a file or command)
|
:r file.txt
|
|
Delete one char
Delete one char to left |
x
X |
|
Delete text to motion
|
d<motion>
|
|
Change text to motion
|
c<motion>
|
|
Delete single line
|
dd
|
|
Change entire line
|
cc | S
|
|
Delete to end of line
|
D
|
|
Change to the end of line
|
C
|
|
Replace single character at cursor
|
r<char>
|
|
Enter insert mode but replace text
|
R
|
|
Copy text to motion
|
y<motion>
|
|
Copy line
|
yy
|
|
Paste text after cursor
Paste text before cursor |
p
P |
|
A word (arround something)
|
a<motion/char>
|
|
Inner word (inside something)
|
i<motion/char>
|
|
Enter Visual Mode
|
v
|
|
Enter Visual Block Mode
|
<Ctrl-v>
|
|
Enter Visual Line Mode
|
<Shift-v>
|
|
Search forward
|
/
|
|
Search backward
|
?
|
|
Move to next search result
Move to previous search |
n
N |
|
Match whole word
|
\<text\>
|
|
Regex searching
|
^$.
|
|
Search forward the word under the cursor
|
*
|
|
Search backward the word under the cursor
|
#
|
|
Access register
|
"[a-z]
|
|
Append to register
|
"[A-Z]
|
|
Start recording macro
|
q[a-z]
|
|
Execute recorded macro
|
@[a-z]
|
|
Execute last used macro
|
@@
|
|
Save file
|
:w
|
|
Save and Quit
|
:wq
|
|
Edit a new file
|
:e filename
|
|
Save copy of file
|
:w filename.copy
|
|
Save copy and edit copy of file
|
:saveas filename.copy
|
|
Change name of the current file
|
:file filename
|
|
Open file in a split window
|
:split filename
|
|
Open file in a vertically split window
|
:vsplit filename
|
|
Open file in a new tab
|
:tabedit filename
|
|
Move to window
|
<Ctrl-w><motion>
|
|
Move to next tab
|
gt
|
|
Move to previous tab
|
gT
|
|
Move current window to tab
|
<Ctrl-W>T
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.