spacer
header
spacer
process
market
services
company
stuff
slice
vi
slice
unix
slice
sql
slice
 
The vi Editor

 
u
yy
p
ZZ
:wq
:q!
Shift-5
General Commands
undo the last command.
Puts the current line in a buffer. Does not delete the line from its current position.
Places the line in the buffer after the current position of the cursor.
Exits vi and saves changes.
Writes changes to current file and quits edit session.
Quits edit session (no changes made).
Position over a parentheses and Shift -5 will take you to the matching parentheses
 
j
k
h
l
Enter
0
$
SPACE
0
:n
b
e
w
Cursor Positioning Commands
Moves cursor down one line, same column.
Moves cursor up one line, same column.
Moves cursor back one character.
Moves cursor forward one character.
Moves cursor to beginning of next line.
Moves cursor to beginning of current line.
Moves cursor to end of current line.
Moves cursor forward one character.
Moves the cursor to the first character of the line.
Moves cursor to beginning of line n.
Moves the cursor backward to the beginning of the previous word.
Moves the cursor backward to the end of the previous word.
Moves the cursor forward to the next word.
 
a
A
i
I
o
O
DEL
ESC
Text Insertion Commands
Appends text after cursor. Terminated by escape key.
Appends text at the end of the line. Terminated the escape key.
Inserts text before cursor. Terminated by the escape key.
Inserts text at the beginning of the line. Terminated by the escape key.
Opens new line below the current line for text insertion. Terminated by the escape key.
Opens new line above the current line for text insertion. Terminated by the escape key.
Overwrites last character during text insertion.
Stops text insertion. The escape key on the DEC stations is the F11 key.
 
x
dd
dw
d)
D, d$
P
dG
d1G
Text Deletion Commands
Deletes current character.
Deletes current line.
Deletes the current word.
Deletes the rest of the current sentence.
Deletes from cursor to end of line.
Puts back text from the previous delete.
Deletes from the current location to end of file.
Deletes from the current location to top of file.
 
cw
c$
C, cc
~
xp
J
s
rx
R
Changing Commands
Changes characters of current word until stopped with escape key.
Changes text up to the end of the line.
Changes remaining text on current line until stopped by pressing the escape key.
Changes case of current character.
Transposes current and following characters.
Joins current line with next line.
Deletes the current character and goes into the insertion mode.
Replaces current character with x.
Replaces the following characters until terminated with the escape key.
 
:g/search/s//replace/g
: 23,45s/search/replace/g
Search & Replace
Find & Replace.
Find & Replace from line 23 to 45.

 
space
  Sunday December 16, 2018 © 2018   Database & Internet Resources, Inc.