VI (VIM) MODE Flashcards
Understanding Vi
Exit vi mode for file4, but do NOT save the contents of the file
1) Esc
2) :q!
When skimming a file in vi, skip to the beginning of the file
[[
]]
Skips to the end of the file in vi
Start a new line above the previous line
O
Start a new line below the previous line
o
Delete a line
dd
Undo previous changes
u
Appends text after cursor
a
Move cursor to the end of the line
A
Move cursor to the left
h
Move cursor down
j
Move cursor to the right
l
Move cursor up
k
Move to the next word
w
Move to next word after each blank space
W
Move to end of word
e
i
Enter into insert mode
(
Moves sentence back
)
Moves sentence forward
gg
Moves to top first word of the document
G
Moves to the bottom first word of the document
x
Delete a character
Skip to next word
n
Exit and save
1) Esc
2) :wq or :x or :wq!
/
Used to search a word or string of words
/ [word(s) searching for]
r
replaces a character
r[character]