view(1)
NAME
view − displays a file using the vi commands
SYNTAX
view [−t tag] [−r] [+command] [−l] [−wn] name...
DESCRIPTION
The view command is used to display a text file. The view command and the vi command run almost the same code except that in view changes to a file are not allowed. It is possible to get to the command mode of ex from within both.
NOTE
The following is a list of some of the view commands. See the vi Beginners Reference card, the chapter "Details of Selected Commands" in the ULTRIX-32 Quick Reference, and the Introduction to Display Editing with vi for more details which can be helpful for using view.
Screen Control Commands
<CTRL/L>Reprints current screen.
<CTRL/Y>Exposes one more line at top of screen.
<CTRL/E>Exposes one more line at bottom of screen.
Paging Commands
<CTRL/F>Pages forward one screen.
<CTRL/B>Pages back one screen.
<CTRL/D>Pages down half screen.
<CTRL/U>Pages up half screen.
Cursor Positioning Commands
jMoves cursor down one line, same column.
kMoves cursor up one line, same column.
hMoves cursor back one character.
lMoves cursor forward one character.
<RETURN>Moves cursor to beginning of next line.
0Moves cursor to beginning of current line.
$Moves cursor to end of current line.
<SPACE>Moves cursor forward one character.
nGMoves cursor to beginning of line n. Default is last line of file.
/patternMoves cursor forward to next occurrence of pattern.
?patternMoves cursor backward to next occurrence of pattern.
nRepeats last / or ? pattern search.
Exiting view
ZZExits view.
:qQuits view session.
OPTIONS
−t
Specifies a list of tag files. The tag files are preceded by a backslash (\) and are seperated by spaces when using multiple files. The tag option should always be the first entry.
+command
Tells the editor to begin by executing the specified command. An example would be +/pattern that would search for a pattern.
−l
Sets view up for LISP. Sets the showmatch and lisp options.
−r
Retrieves the last saved version of the named file in the event of a system crash. If no file is specified, a list of saved files is produced.
−wn
Sets the default window size to n. This option is useful for starting in a small window on dialups.
SEE ALSO
edit(1), ex(1), vi(1)
"An Introduction to Display Editing with Vi" in the ULTRIX-32 Supplementary Documents, Vol. I, General User
ULTRIX-32 Quick Reference
Commands