San Diego State University logo

*Technical Briefs*
ROHAN help Files

----------------------------------------------------------------------

vi summary

The following is a summary of the vi full screen editor commands on ROHAN to be used as a reference.

Topics

------------------------------------------------------------

Command Mode commands

CTRL key is represented by a ^ character and type all commands as shown (case-sensitive).
^B
move backward one screen
^D
scroll down one half screen
^E
expose one more line at bottom of screen
^F
move forward one screen (same as :f)
^G
print statistics on current file and position
^H
move back one space (same as h)
^J
move to corresponding position on next line (same as j)
^L
redraw screen
^M
same as CR
^N
same as ^J
^P
move to corresponding position on previous line (same as k)
^R
redraw screen, eliminating deleted lines marked by @
^U
scroll up
^Y
expose one more line at top of screen
^Z
suspend currently active Unix command
^[
escape cancels a pending command in command mode, and is used to terminate insert mode
^]
same as :ta with word after cursor as argument; moves to the tag whose name is given by the word containing the cursor
^`
same as :vi # or :e #

A
append text at end of current line
B
move to start of current big word
CR
move to first non-blank position on next line (return or enter key)
C
change from cursor to end of line
D
delete from cursor to end of line
E
move to end of current big word
Fx
move backward to character x on current line
nG
move to start of line n
G
move to the end of the file
H
move to start of top line on current screen
I
insert text at beginning of current line
J
join next line to current one
L
move to start of last line on current screen
N
search for pattern in opposite direction
O
insert line above current line
P
put contents of the yank/delete buffer into text before cursor
R
replace characters by overtyping
S
change line
Tx
move backward to character after x on current line
U
undo all current changes on current line
W
move to start of next big word
X
delete character before cursor
Y
copy current line into buffer (same as yy)
ZZ
save file and quit

a
append text after cursor
b
move to start of current word
c
change object
d
delete object
e
move to end of current word
fx
move forward to character x on current line
h
move left one space
i
insert text before cursor
j
move down one line
k
move up one line
l
move right one space (same as space)
mx
associate a mark (x) with current position of cursor
n
search for pattern in same direction
o
insert line below current line
p
put contents of a buffer into text after cursor
r
replace character
s
change characters
tx
move forward to character before x on current line
u
undo last change
w
move to start of next word
x
remove character
y
copy object into buffer
zCR
redraw screen with current line at the top
z-
redraw screen with current line at the bottom
z.
redraw screen with current line at the center
/pat/z-
redraw screen with pat line at the bottom
zn.
use window with line size n

space
move right one column (spacebar)
-
move to first non-blank position on previous line
$
move to end of current line
%
if given with cursor on (, { or [, moves it to matching ), }, or ]
"
return to start of line you were previously on
'x
move to start of line containing mark x
(
move to start of current sentence
)
move to start of next sentence
+
move cursor to first non-blank character on next line (same as CR)
.
repeat last command which changed buffer
/patCR
move forward to first occurrence of pattern pat
0
move to start of current line
<
decrease indent of each level of object by one shiftwidth
=*
reindent lisp program, as if it had been entered using lisp and autoindent options
>
indent each line of object by one more shiftwidth
?patCR
move backward to first occurrence of pattern pat
[[
move to start of current section
n|
move to column n on current line
]]
move to sart of next section
^
move to first non-blank character on current line
`x
go to postion marked x
``
return to previous position
{
move to start of current paragraph
}
move to start of next paragraph
:
prefix character for line mode ex commands
;
repeat last t, T, f, or F command
1-9
used for adding count prefixes to commands

Return to Top of document

----------------------------------------------------------------------


BACK ROHAN Help Index | Academic Computing Handouts, Manuals, and Help Files

This page last modified: December 12, 2002
Send comments/suggestions about this web page to webmaster@rohan.sdsu.edu

SDSU Faculty and Students may send questions about software on ROHAN or ROHAN UNIX problems to problems@rohan.sdsu.edu