|
<ESC>
|
Exit from other modes into NORMAL mode
|
|
i/I
|
Enter INSERT mode, cursor placed before the current character/first character in line
|
|
a/A
|
Enter INSERT mode, cursor placed after the current character/the end of the line
|
|
o/O
|
Creates a new, empty line below/above the cursor, and enter INSERT mode
|
|
v
|
Enter Visual mode, cursor movement selection
|
|
V
|
Enter Visual mode, line selection
|
|
<CTRL>-v
|
Enter Visual mode, block selection
|
|
:
|
Enter COMMAND-LINE mode
|
|
J
|
Join line at cursor with line below it
|
|
u
|
Undo last edit
|
|
U
|
Undoes all the changes made on the last line that was edited
|
|
p
|
Put
|
|
<CTRL>-r
|
Reverse the preceding command
|
|
ZZ
|
Writes the file and exits
|
|
y
|
Copy (Yank)
|
|
c
|
Change (deletes and enters INSERT mode)
|
|
d
|
Delete
|
|
w
|
Word
|
|
W
|
WORD
|
|
s
|
Sentence
|
|
p
|
Paragraph
|
|
[ or ]
|
[] block
|
|
( or ) or b
|
() block
|
|
< or >
|
<> block
|
|
{ or }
|
{} Block
|
|
w/W
|
Start of the next word/WORD
|
|
b/B
|
Start of the previous word/WORD
|
|
e/E
|
End of the next word/WORD
|
|
ge/gE
|
End of the previous word/WORD
|
|
0 or <HOME>
|
Very first character of the line
|
|
^
|
First non-blank character of the line
|
|
$
|
End of a line (eol)
|
|
f/F{char}
|
Forward/backwards to character {char}
|
|
t/T{char}
|
Like f/F but stops on character before (To)
|
|
%
|
Matching pair (for parenthesis, square brackets and squiglies)
|
|
h or <RIGHT>
|
Right
|
|
k or <UP>
|
Up
|
|
j or <DOWN>
|
Down
|
|
l or <LEFT>
|
Left
|
|
H
|
First line on screen (High)
|
|
M
|
Middle line on screen (Middle)
|
|
L
|
Last line on screen (Low)
|
|
<CTRL>-u
|
Scroll half a page up
|
|
<CTRL>-d
|
Scroll half a page down
|
|
<CTRL>-y
|
Scroll up one line
|
|
<CTRL>-e
|
Scroll down one line
|
|
<CTRL>-b
|
Scroll up (Back) one screen minus 2 lines
|
|
<CTRL>-f
|
Scroll down (Forward) one screen minus 2 lines
|
|
zt
|
Move cursor line to the top of screen
|
|
zz
|
Move cursor line to middle of screen
|
|
zb
|
Move cursor line to the bottom of screen
|
|
<CTRL>-w w
|
Jump between the windows
|
|
<CTRL>-w t
|
Move to the TOP window
|
|
<CTRL>-w b
|
Move to the BOTTOM window
|
|
<CTRL>-w +
|
Increase the size of a window
|
|
<CTRL>-w -
|
Decrease the size of a window
|
|
s
|
Change one character
|
|
x
|
Delete character under the cursor
|
|
X
|
Delete character left of the cursor
|
|
r
|
Waits for you to type a character, and will replace the character under the cursor with it
|
|
C
|
Change to the end of line
|
|
D
|
Delete to the end of line
|
|
yy
|
Copy a whole line
|
|
cc or S
|
Change a whole line
|
|
dd
|
Deletes a whole line
|
|
.
|
Repeats the last change (except undo)
|
|
o
|
Change cursor to the other end of the selection
|
|
O
|
Change corner in block selection
|
|
I{string}<Esc>
|
Inserts the text {string} in each line, to the left of the block
|
|
A{string}<Esc>
|
Inserts the text {string} in each line, to the right of the block
|
|
$A{string}<Esc>
|
Same as A{string}<Esc>, but will append the string in the lines that are shorter
|
|
C{string}<Esc>
|
Deletes the block and then throws you into Insert mode to enable you to type in a string
|
|
/{pattern}
|
Search forwards
|
|
?{pattern}
|
Search backwards
|
|
n/N
|
Move to next/previous occurrence
|
|
<UP> and <DOWN>
|
Move through the history of search commands
|
|
*
|
Grab the word under the cursor and search forward
|
|
#
|
grab the word under the cursor and search backwards
|
|
\
|
Escape special characters below to look for them
|
|
^
|
Matches the beginning of a line
|
|
$
|
Matches the end of a line
|
|
.
|
Matches any existing character
|
|
No range specified
|
Current line
|
|
%
|
All lines
|
|
{number}
|
Line
|
|
.
|
First line
|
|
$
|
Last line
|
|
- 0r + {number}
|
Line offset from range boundary
|
|
No flag specified
|
First occurrence in range
|
|
g
|
All ocurrences in range
|
|
c
|
Ask for confirmation before it performs each substitution
|
|
edit <filename>
|
Edit new file, or load existing
|
|
q
|
Quit
|
|
q!
|
Quit and throw changes away
|
|
saveas <filename>
|
Save contents as <filename> and continue editing
|
|
file <filename>
|
Change current file name (does not write it)
|
|
substitute or s
|
Find and replace, in the form [range]substitute/from/to/[flags] (see substitution pannels)
|
|
new
|
Open a window on a new, empty file above the current one
|
|
split
|
Open a new window above the current one. If file name is provided, opens a second window and starts editing the given file
|
|
close
|
Close current window
|
|
only
|
Closes all windows, except for the current one
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.