HP t5525 Customization Techniques on HP Compaq Linux Thin Clients - Page 11

Appendix A: Partial list of vi commands

Page 11 highlights

Appendix A: Partial list of vi commands Starting an Editing Session Text Insertion Commands vi filename, where filename is name of file to be edited. Undo Command u undo the last command. Cursor Positioning Commands a Appends text after cursor. Terminated by ESC key. A Appends text at end of the line. Terminated the ESC key. i Inserts text before cursor. Terminated by the ESC key. j Moves cursor down one line, same column. k Moves cursor up one line, same column. h Moves cursor back one character. l Moves cursor forward one character. RET Moves cursor to beginning of next line. O l Inserts text at beginning of line. Terminated by ESC key. o Opens new line below current line for text insertion. Terminated by ESC key. O Opens new line above the current line for text insertion. Terminated by the ESC key. DEL Overwrites last character during text insertion. ESC Stops text insertion. The ESC key on the DECstations is F11. Text Deletion Commands Moves cursor to start of current line. $ Moves cursor to end of current line. SPACE Moves cursor forward one character. nG Moves cursor to beginning of line n. Default is last line of file. O Moves cursor to 1st char. of line. :n Moves cursor to beg. of line n. b Moves cursor backward to beginning of previous word. x Deletes current character. dd Deletes current line. dw Deletes the current word. d) Deletes the rest of the current sentence. D, d$ Deletes from cursor to end of line. P Puts back text from the previous delete. Cut and Paste Commands e Moves the cursor backward to the end of the previous word. w Moves cursor forward to next word. n yy Puts current line in a buffer. Does not delete line from current position. p Places line in the buffer after the current position of the cursor. Exiting vi Repeats last / or ? pattern search. Changing Commands ZZ Exits vi and saves changes. cw Changes characters of current word until stopped with ESC. :wq Writes changes to current file and quits edit session. :q! Quits edit session (no changes) made). 11

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

11
Appendix A: Partial list of vi commands
Starting an Editing Session
Text Insertion Commands
vi
filename
, where
filename
is name of file to be edited.
a
Appends text after cursor. Terminated by
ESC
key.
Undo Command
A
u
Appends text at end of the line. Terminated the
ESC
key.
undo the last command.
i
Cursor Positioning Commands
Inserts text before cursor. Terminated by the
ESC
key.
j
l
Moves cursor down one line, same column.
Inserts text at beginning of line. Terminated by
ESC
key.
k
o
Moves cursor up one line, same column.
Opens new line below current line for text insertion. Termi-
nated by
ESC
key.
h
O
Moves cursor back one character.
Opens new line above the current line for text insertion. Termi-
nated by the
ESC
key.
l
DEL
Moves cursor forward one character.
Overwrites last character during text insertion.
RET
ESC
Moves cursor to beginning of next line.
Stops text insertion. The
ESC
key on the DECstations is
F11.
O
Text Deletion Commands
Moves cursor to start of current line.
x
$
Deletes current character.
Moves cursor to end of current line.
dd
SPACE
Deletes current line.
Moves cursor forward one character.
dw
n
G
Deletes the current word.
Moves cursor to beginning of line
n
. Default is last
line of file.
d)
O
Deletes the rest of the current sentence.
Moves cursor to 1st char. of line.
D, d$
:
n
Deletes from cursor to end of line.
Moves cursor to beg. of line
n
.
P
b
Puts back text from the previous delete.
Moves cursor backward to beginning of previous word.
Cut and Paste Commands
e
yy
Moves the cursor backward to the end of the previous
word.
Puts current line in a buffer. Does not delete line from current
position.
w
p
Moves cursor forward to next word.
Places line in the buffer after the current position of the cursor.
n
Exiting vi
Repeats last / or ? pattern search.
ZZ
Changing Commands
Exits vi and saves changes.
cw
:wq
Changes characters of current word until stopped with
ESC
.
Writes changes to current file and quits edit session.
:q!
Quits edit session (no changes) made).