vim Flashcards
h
move left 1 character
l
move cursor right 1 character
j
move cursor down 1 line
k
move the cursor up one line
w
move cursor forward one word to front of next word
e
move cursor to end of current word
b
move cursor backward one word
move cursors to the beginning of the line
$
move cursor to the end of the line
gg
move cursor to the files first line
G
move cursor to files last lime
nG
move cursor to file line number n
Ctrl + B
scroll up almost 1 screen
Ctrl + F
scroll down almost 1 screen
Ctrl + U
scroll up half of screen
Ctrl + D
scroll down half of screen
Ctrl + Y
scroll up one line
Ctrl + E
scroll down one line
Insert Mode
edit or entry mode
Ex Mode
colon commands
command mode
normal mode
a
insert text after cursor
A
insert text at end of text line
dd
delete current line
dw
delete current word
i
insert text before cursor
l
insert text before beginning of text line
o
open new text line below cursor
O
open new text line above cursor and move into insert mode
p
paste copied text after cursor
P
past copied (yanked) text before cursor
yw
yank (copy) current word
yy
yank (copy) current line
:!
execute shell command and display results. don’t quit
:r!
execute shell command and include the results in editor buffer area
:r
read file contents and include them in buffer area
:x
write buffer to file and quit
:wq
write buffer to file and quit editor
:wq!
write buffer
:w
write to buffer file and stay in editor
:w!
write to buffer file and stay in editor (overrides protection)
:q
quit editor without writing buffer to file
:q!
quit editor without writing buffer to file
ZZ
write buffer to file and quit editor