is a paging program that displays,
one windowful at a time,
the contents of a file on a terminal.
It pauses after each windowful and prints on the window status line
the screen the file name, current line number,
and the percentage of the file so far displayed.
Unlike other paging programs,
is capable of displaying an arbitrary number of windows
as long as each window occupies at least two screen lines.
Each window may contain the same file or a different file.
In addition, each window has its own mode.
For example, one window may display a file with its lines wrapped while
another may be truncating the lines.
Windows may be `locked'
together in the sense that if one of the locked windows scrolls,
all locked windows will scroll.
is also capable of ignoring lines
that are indented beyond a user specified value.
This is useful when viewing computer programs to pick out
gross features of the code.
command for a description of this feature.
In addition to displaying ordinary text files,
can also display binary files as well as files with arbitrary ascii
When a file is read into a buffer,
examines the first 32 bytes of
the file to determine if the file is a binary file and then switches
to the appropriate mode.
However, this feature may be disabled with the
See the description of the
options for further details.
Text files may contain combinations of underscore and backspace
characters causing a printer to underline or overstrike.
it inserts the appropriate escape sequences to
achieve the desired effect.
some files cause the printer to overstrike some characters
by embedding carriage return characters in the middle of a line.
When this occurs,
displays the overstruck character with a bold
This feature facilitates the reading of
man pages or a document produced by
viewing this document with
should illustrate this behavior provided that the
underline characters have not been stripped.
This may be turned off with the
By default, lines with more characters than the terminal width are
not wrapped but are instead truncated.
When truncation occurs, this
is indicated by a `$' in the far right column of the terminal
The RIGHT and LEFT arrow keys may be used to view lines
which extend past the margins of the screen.
option may be used to override this feature.
When a window is wrapped,
the character `\' will appear at the right edge of the window.
Commands are listed below.
VT100 mode. This is meaningful only on VMS systems. This option should be
used if the terminal is strictly a VT100. This implies that the terminal
does not have the ability to delete and insert multiple lines. VT102s and
above have this ability.
Use this switch when you want to view files
containing 8 bit characters.
will display the file 16 bytes per line in hexadecimal notation.
A typical line looks like:
When used with the
option, the same line looks like:
^A^@^@^@ @^@^U u 9C #A0 @^@^V8D ....@..u.#. @...
Disable color support.
Omit the backslash mark used to denote a wrapped line.
Disable the use of mmap.
Replace multiple blank lines with a single blank line.
option turns off gunzip-on-the-fly.
Display control characters as in `^A' for control A.
does not interpret control characters.
Display tabs as `^I'.
This option is meaningful only when used with the
Start up at
Make searches case sensitive.
By default, they are not.
Disable UTF-8 mode even if the locale dictates it.
Force UTF-8 mode. By default most will use the current locale to
determine if UTF-8 mode should be used. The
switches allow the behavior to be overridden.
This switch should only be used if you want the option to
delete a file while viewing it.
This makes it easier to
clean unwanted files out of a directory.
The file is
deleted with the interactive key sequence
and then confirming with
Start up at the line containing the first occurrence of
Some commands have an optional numeric argument
,entered before the command. If not given, the
default value of
Commands take effect immediately; typing a
after isn't necessary or correct. (Besides,
itself is a command.)
Example: to go down one line, press the
key. To go down 20 lines, press
RETURN, DOWN_ARROW, V, CTRL-N
Display another line, or
more lines, if specified.
UP_ARROW, ^, CTRL-P
Display previous line, or
previous lines, if specified.
Move to top of buffer.
Move to bottom of buffer.
RIGHT_ARROW, TAB, >
Scroll window left
columns to view lines that are beyond the right margin of the window.
LEFT_ARROW, CTRL-B, <
Scroll window right
columns to view lines that are beyond the left margin of the window.
U, CTRL-U, DELETE, PREV_SCREEN
windowfuls and then print a windowful.
Redraw the window.
is not specified, then prompt for a line number then jump to that line
otherwise just jump to line
is not specified, then prompt for a
percent number then jump to that percent of the
file otherwise just jump to
percent of the file.
If the current screen width is 80, make it 132 and vice-versa.
For other values, this command is ignored.
Q, CTRL-X CTRL-C, CTRL-K E
On VMS, ^Z also exits.
h, CTRL-H, HELP, PF2
Give a description of all the
must be set for this to be meaningful.
f, /, CTRL-F, FIND, GOLD PF3
Prompt for a string and search forward from the
current line for
distinct line containing the string.
Prompt for a string and search backward for the
distinct line containing the string.
Search for the next
lines containing an occurrence of the last search string in the
direction of the previous search.
m, SELECT, CTRL-@, CTRL-K M, PERIOD
Set a mark on the current line for later reference.
INSERT_HERE, CTRL-X CTRL-X, COMMA, CTRL-K RETURN, GOLD PERIOD
Set a mark on the current line but return to previous mark.
This allows the user to toggle back and forth between two positions
in the file.
Toggle locking for this window.
The window is locked if there is a `*' at the left edge
of the status line.
Windows locked together, scroll together.
CTRL-X 2, CTRL-W 2, GOLD X
Split this window in half.
CTRL-X o, CTRL-W o, o, GOLD UP, GOLD DOWN
Move to other window.
CTRL-X 0, CTRL-W 0, GOLD V
Delete this window.
CTRL-X 1, CTRL-W 1, GOLD O
Delete all other windows, leaving only one window.
Edit this file.
$, ESC $
This is system dependent.
On VMS, this causes
to spawn a subprocess.
When the user exits the process,
simply suspends itself.
Skip to the next filename given in the command line.
Use the arrow keys to scroll forward or backward
through the file list.
and any other key selects the given file.
Toggle case sensitive search.
Delete current file.
This command is only meaningful with the
Toggle various options.
With this key sequence,
displays a prompt asking the user to hit
options have the same meaning as the command
For example, the
option will toggle wrapping on and off for the current window.
option must be used with a prefix integer
All lines indented beyond
columns will not be displayed.
For example, consider the fragment:
int main(int argc, char **argv)
for (i = 0; i < argc, i++)
The key sequence
to display the file ignoring all lines indented beyond the first column.
So for the example above,
int main(int argc, char **argv)...
where the `...' indicates lines follow are not displayed.
aborts the commands requiring the user to type something
in at a prompt.
The backquote key has a special meaning here.
It is used to quote certain characters.
This is useful when search for
the occurrence of a string with a control character or a string at
the beginning of a line.
In the latter case, to find the occurrence
of `The' at the beginning of a line, enter
uses the following environment variables:
This variable sets commonly used switches.
some people prefer to use
option so that excess blank lines are not displayed.
On VMS this is normally done done in the login.com through the line:
$ define MOST_SWITCHES "-s"
Either of these environment variables specify an editor for
to invoke to edit a file. The value can contain %s and %d formatting
descriptors that represent the file name and line number,
respectively. For example, if JED is your editor, then set
to 'jed %s -g %d'.
This variable may be used to specify an alternate help file.
Set this variable to specify the initialization file to load during
startup. The default action is to load the system configuration file
and then a personal configuration file located at
CONFIGURATION FILE SYNTAX
starts up, it tries to read a system configuration file and
then a personal configuration file. These files may be used to
specify keybindings and colors.
To bind a key to a particular function use the syntax:
setkey function-name key-sequence
command requires two arguments. The
argument specifies the function that is to be executed as a response
to the keys specified by the
argument are pressed. For example,
setkey "up" "^P"
indicates that when
is pressed then the function
is to be executed.
Sometimes, it is necessary to first unbind a key-sequence before
rebinding it in order via the
Colors may be defined through the use of the
keyword in the configuration file using the syntax:
color OBJECT-NAME FOREGROUND-COLOR BACKGROUND-COLOR
Here, OBJECT-NAME can be any one of the following items:
status -- the status line
underline -- underlined text
overstrike -- overstriked text
normal -- anything else
See the sample configuration files for more information.
Almost all of the known bugs or limitations of
are due to a desire to read and interpret control characters in files.
One problem concerns the use of backspace characters to underscore or
overstrike other characters.
makes an attempt to use terminal
escape sequences to simulate this behavior.
One side effect is the
one does not always get what one expects when scrolling right and
left through a file.
When in doubt, use the