Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctab(1)

ctags(1)

ed(1)

/red(1)

edit(1)

ex(1)

grep(1)

/fgrep(1)

/egrep(1)

nroff(1)

ctab(4)

vi(1)  —  Commands

OSF

NAME

vi, vedit, view − Edits files with a full screen display

SYNOPSIS

vi/vedit/view [-lRv] [-wnumber] [+subcommand] [-] [file ...]

vi/vedit/view [-lRv] [-t tag] [file ...]

vi/vedit/view -r[file] [-lRv] [file]

The vi command is a display editor that is based on an underlying line editor (ex). 

FLAGS

-lIndents appropriately for LISP code, and accepts the (, ), {, }, [, and ] characters (parentheses, braces, and brackets) as text rather than interpreting them as vi subcommands.  The LISP modifier is active in open or visual modes. 

-r[file]Recovers file after an editor or system crash.  If you do not specify a file, vi displays a list of all saved files. 

-RSets the readonly option to protect the file against overwriting. 

-t tagEdits the file containing the tag and positions the editor at its definition.  To use this flag, you must first create a database of function names and their locations using the ctags command. 

-vInvokes the visual editor.  When the -v flag is specified, an enlarged set of subcommands is available, including screen editing and cursor movement features. 

-wnumber
Sets the default window size to number.  This is useful when you use the editor over a low-speed line. 

-Suppresses all interactive user feedback.  If you use this flag, file input/output errors do not generate an error message. 

+[subcommand]
Performs the ex subcommand before editing begins.  If you do not specify subcommand, the cursor is placed on the first line of the file. 

DESCRIPTION

The ex editor subcommands can be used within the vi editor, because vi is based on ex.  The view command is a read-only version of vi; the readonly option is set to protect files during browsing.  The vedit command is a version of vi intended for beginners.  In it, the report option is set to 1, the showmode option is set, and the novice option (making vedit a line editor, rather than a screen editor) is set.  (For more information on these options, see Setting Options.) 

The file argument specifies the files to be edited.  If you supply more than one file on the command line, vi edits each file in the order specified. 

When you use vi, changes you make to a file are reflected on your display.  The position of the cursor on the display indicates its position within the file.  The subcommands affect the file at the cursor position. 

Limitations of the vi Editor

The maximum limits of the vi editor are as follows:

       •2048 bytes per line

       •256 bytes per global command list

       •128 bytes in the previous inserted and deleted text

       •128 bytes in a shell escape command

       •128 bytes in a string-valued option

       •30 bytes in a tag name

       •128 map macros with 2048 bytes total. 

Editing Modes

The vi editor has the following operational modes:

Command mode
When you start the vi editor, it is in Command mode.  Any subcommand can be entered from this mode, except commands that can only be used in the Text Input mode (those subcommands that make corrections during text insertion).  When subcommands and the other modes end, vi returns to Command mode.  Pressing the <Esc> key cancels a partial subcommand. 

Text Input mode
Entered by the a, A, i, I, o, O, cx (where x represents the scope of the subcommand), C, s, S, and R subcommands.  After entering one of these commands, you can enter text into the editing buffer at the current cursor position.  To return to Command mode, press <Esc> for normal exit or press the Interrupt key sequence to end abruptly. 

Last Line mode
Some subcommands (those with the prefix : (colon), / (slash), ? (question mark), or !!) read input on a line displayed at the bottom of the screen.  When you enter the initial character, vi places the cursor at the bottom of the screen, where you enter the remaining characters of the command.  Press <Return> to perform the subcommand and enter the Interrupt key sequence to cancel it.  When !! is used, the cursor moves only after the two exclamation points are entered.  When : is used, special meaning is given to the following characters if used as counts before a command:

%All lines, regardless of cursor position

$Last line

.Current line

Setting Options

The vi editor allows you to customize options so that you can use the editor for a specific task.  Use the set command to set or change an option.  To view the current setting of options, enter :set all while in vi Command mode. 

Some options are set to a string or a number value; other options are simply turned on or off.  To change an option that is set to a value, enter a command in the form :set option=value.  To toggle an option that can be set to on or off, enter a line of the form :set option to set it to on or :set nooption to set it to off. 

Options can be abbreviated in a set command.  The following table lists some of vi’s options, along with abbreviations and descriptions:

Table 0-0.  vi Options

Option Abbreviation Description
[no]autoindent ai Indents automatically in Text mode to the indentation on the previous line by using the spacing between tab stops specified by the shiftwidth option.  The default is noai.  To back the cursor up to the previous tab stop, type <Ctrl-d>.  This option is not in effect for global commands. 
[no]autoprint ap Prints the current line after any command that changes the editing buffer. The default is ap.  This option applies only to the last command in a sequence of commands on a single line, and is not in effect for global commands. 
[no]autowrite aw Writes the editing buffer to the file automatically before the :n, :ta, <Ctrl-a>, and ! subcommands if the editing buffer was changed since the last write command.  The default is noaw. 
[no]beautifying text bf Prevents user from entering control characters (except for tab, newline, and formfeed) in the editing buffer during text entry.  The default is nobf.  This option does apply to command input. 
directory dir= Displays the directory that contains the editing buffer.  The default is dir=/tmp. 
[no]edcompatible ed Retains global (g) and confirm (c) subcommand suffixes during multiple substitutions and causes the read (r) suffix to work like the r subcommand.  The default is noed. 
[no]flash fl Uses visual flash rather than audible bell.  The default is fl. 
hardtabs ht= Tells vi the distance between the hardware tab stops on your display.  The default is ht=8. 
[no]ignorecase ic Ignores the distinction between uppercase and lowercase while searching for regular expressions.  The default is noic. 
[no]lisp lisp Enters vi in LISP mode.  In this mode, vi appropriately indents for LISP code and the (, ), {, }, [[, and ]].  The default is nolisp. 
[no]list list Displays text with tabs and the end of lines marked.  Tabs are displayed as ^I and the end of lines as $.  The default is nolist. 
[no]magic magic Treats the characters ., [, and ∗ as special characters in scans.  In Off mode, only the (, ), and $ characters retain special meanings; however, special meaning of other characters can still be invoked by preceding the character with a \ (backslash).  The default is magic. 
[no]modeline modeline Runs an editor command line if found in the first five and the last five lines of the file.  An editor command line may be anywhere in a line.  To be recognized as a command line, it must contain a space or a tab followed by the string ex: or vi:.  The command line is ended by a second : (colon).  The editor tries to interpret any data between the first and second : as editor commands.  The default is nomodeline. 
[no]number nu Displays lines prefixed with their line numbers.  The default is nonu. 
[no]optimize opt Speeds up the operation of terminals that do not have cursor addressing.  The default is noopt. 
paragraphs para= Defines macro names that start paragraphs.  The default is para=IPLPPPQPP LIpplpipnpbp.  Single letter nroff macros, such as .P must include the space as a quoted character if respecifying a paragraph. 
[no]redraw re Simulates a smart display on a dumb display.  The default is nore. 
[no]remap remap Enables following of map keys.  For example, if remap is set, map u k map r u causes r to map to k.  If noremap is set, r maps to u.  The default is remap. 
report report= Sets the number of repetitions of a command before a message is displayed.  For subcommands that can produce a number of messages, such as global subcommands, the messages are displayed when the command is completed.  The default is report=5. 
scroll scr= Sets the number of lines to be scrolled when you scroll the screen up or down.  The default scroll is one-half the size of the screen. 
sections sect= Defines macro names that start sections.  The default is sect=NHSHH HUuhsh+c.  Single letter nroff macros, such as .P must include the space as a quoted character if respecifying a paragraph. 
shell sh= Defines the shell for ! or :! commands.  The default is the value of the SHELL environment variable. 
shiftwidth sw= Sets the distance for the software tab stops used by autoindent, the shift commands (> and <), and the text input commands (<Ctrl-d> and <Ctrl-t>) to allow the editor to indent text and move back to a previous indentation.  The default is sw=8. 
[no]showmatch sm Shows the matching open parenthesis (  or open brace { as you type the close parenthesis ) or close brace }.  The default is nosm. 
[no]showmode smd Displays mode indicator at the bottom of the screen when in the insert or replace mode.  The default is nosmd. 
[no]slowopen slow Postpones updating the display during inserts.  The default is noslow. 
tabstops ts= Sets distance between tab stops when a file is displayed.  The default is ts=8. 
[no]tags tag Specifies a list of possible filenames of tag files.  The default is tags /usr/lib/tags. 
term term= Sets the kind of display you are using.  The default is term=$TERM, where $TERM is the value of the TERM shell variable. 
[no]terse terse Allows vi to display the short form of messages.  The default is noterse. 
[no]timeout to Sets a time limit of 2 seconds on entry of characters.  This limit allows the characters in a macro to be entered and processed as separate characters when timeout is set.  To resume use of the macro, set notimeout.  The default is to. 
[no]warn warn Displays a warning message before the ! subcommand executes a shell command if this is the first time you issued a shell command after a given set of changes were made in the editing buffer, but not written to a file.  The default is warn. 
window wi= Sets the number of lines displayed in one window of text.  The default is dependent on the baud rate at which you are operating:  600 baud or less / 8 lines, 1200 baud / 16 lines, higher speeds / full screen minus 1. 
wrapmargin wm= Sets the margin for automatic wordwrapping from one line to the next.  A value of 0 indicates no wordwrapping.  The default is wm=0. 
[no]wrapscan ws Allows string searches to wrap from the end of the editing buffer to the beginning.  The default is ws. 
[no]writeany wa Turns off the checks usually made before a write command.  The default is nowa. 

Defining Macros

If you use a subcommand or sequence of subcommands frequently, you can create a macro that issues the subcommand or sequence when you call a macro.  To create a macro, enter the sequence of subcommands into an editing buffer named with a letter of the alphabet.  When used as buffer names, lowercase ASCII letters a through z overlay the contents of the buffer, while uppercase ASCII letters A through Z append text to the previous contents of the buffer, allowing the building of a macro piece by piece. 

To invoke the macro, enter @x, where x is the letter name of the buffer.  Enter @@  to repeat the last macro you invoked. 

Mapping Keys

You can use the map command to set a keystroke to a subcommand or a sequence of subcommands.  To set a key mapping, enter :map key subcommand where key is the key to which you want to assign a subcommand or sequence of subcommands and subcommand is the subcommand or sequence of subcommands.  For example, to set @ to delete lines, enter:

:map  @  dd

In this example, @ is the key to which the subcommand is assigned and dd is the subcommand. 

In the next example, a subcommand sequence is mapped to a key:

:map ∗ {>}

The ∗ (asterisk) is the key to which the subcommand sequence is assigned and {>} is the subcommand sequence.  The { (open brace) moves the cursor to the beginning of the paragraph and the > (right angle bracket) indents the paragraph to the next shiftwidth. 

To display the list of the current key mappings while you are in Command mode, enter the :map command.  You can also remove a key mapping.  To remove a key mapping, enter :unmap string or :unmap! string where string is the string used used after the :map command to set the key and subcommand sequence.  For example, to remove key mapping for the previous example, enter:

:unmap ∗

If function keys are defined for your terminal, they can be put in a map or unmap command by typing <Ctrl-v> then pressing the desired key.  In this way, function keys that are unused during editing can be mapped to useful editing subcommand sequences. 

Abbreviations

You can define abbreviations for long phrases that you use often.  vi then automatically expands these abbreviations whenever you enter them in insert mode. 

To define an abbreviation, enter:

:abbr abbreviation phrase

abbreviation is the abbreviation you specify for the longer text specified by phrase.  For example, to specify the abbreviation imho for the phrase In my humble opinion, enter:

:abbr imho In my humble opinion

Keeping a Customized Change

When you customize vi from the vi command line, the customized editor is in effect until you exit the editor.  If you want such things as option settings and key mappings so you can reuse them, you must put them in the .exrc file in your home directory.  vi processes the commands given in the EXINT variable and then reads this file each time you invoke it.  When you type the commands in a file, do not type the : (colon) before each command.  The : is required only if you are in the editor.  Here is an example of an .exrc file:

set ai aw
set wm=5
map  @  dd

vi Character Sets

The collation sequence, as defined by the value of the LC_COLLATE environment variable, defines the alphanumeric set used by your system.  This table affects the performance of vi macros and subcommands. 

The vi editor uses the collation sequence to distinguish between a small word and a big word.  A small word is bounded by letters or numbers as defined in the collation table.  For example, isn’t is two small words.  The ’ (apostrophe) is not a number or an alphabetic character, and it bounds both the small word t and the small word isn.  A big word is bounded by spaces, tabs, or newline indicators.  For example, stop is a big word.  For more information, see the section Moving to Words, and the reference page for the ctab command. 

SUBCOMMANDS

Subcommand Syntax

[named_buffer] [operator] [number] argument

Surrounding brackets indicate optional items. 

[named_buffer]
A temporary text storage area.

[operator]
Specifies the subcommand or action; instructs the vi editor. 

[number]A whole decimal value that specifies either the extent of the action or a line address.  The vi editor interprets this number in one of the following ways:

     1.Go to line number:

5G
10z<Return>

     2.Go forward number columns. 

25<Space>

     3.Scroll number of lines:

10<Ctrl-d>
10<Ctrl-u>

     4.Delete number lines:

6dd

     5.% means all.  To yank all lines:

%y

(The preceding command replaces 1,$y.) 

argument
Specifies what to act on.  This can be a text object (a character, word, sentence, paragraph, section, or character string) or a text position (a line, position in the current line, or screen position).

Moving Within a File

Enter the following subcommands in Command mode.  You can cancel an incomplete subcommand by pressing the <Esc> key. 

<Left Arrow>, h, <Ctrl-h>
Moves the cursor one character to the left.

<Down Arrow>, j, <Ctrl-j>, <Ctrl-n>
Moves the cursor down one line, remaining in the same column.

<Up Arrow>, k, <Ctrl-p>
Moves the cursor up one line, remaining in the same column.

<Right Arrow>, l <Space>
Moves the cursor one character to the right. Long lines:  Lines over one screen width are wrapped but not broken. When using the Up Arrow or Page Up key, @ lines are added at the bottom of the screen when too few physical lines are available to display the complete line.  The Down Arrow key moves the entire line off the screen at once. 

Character Positioning Within a Line

Enter the following subcommands in Command mode. 

^Moves the cursor to the first nonspace character. 

0Moves the cursor to the beginning of the line. 

$Moves the cursor to the end of the line. 

fxMoves the cursor to the next x character. 

FxMoves the cursor to the last x character. 

txMoves the cursor to one column before the next x character. 

TxMoves the cursor to one column after the last x character. 

;Repeats the last f, F, t, or T subcommand. 

,Repeats the last f, F, t, or T subcommand in the opposite direction. 

number<Space>
Moves the cursor to the specified column.

Moving to Words

Enter the following subcommands in Command mode. 

wMoves the cursor to the next small word. 

bMoves the cursor to the previous small word. 

eMoves the cursor to the end of the next small word. 

WMoves the cursor to the next big word. 

BMoves the cursor to the previous big word. 

EMoves the cursor to the end of the next big word. 

Moving by Line Positioning

Enter the following subcommands in Command mode. 

GMoves to the line number given as preceding argument, or the end of the file if no preceding count is given. 

HMoves the cursor to the top line on the screen. 

LMoves the cursor to the last line on the screen. 

MMoves the cursor to the middle line on the screen. 

+Moves the cursor to the next line, at its first nonspace character. 

-Moves the cursor to the previous line, at its first nonspace character. 

<Return>
Moves the cursor to the next line, at its first nonspace character.

Moving to Sentences, Paragraphs, or Sections

Enter the following subcommands in Command mode.  You can cancel an incomplete subcommand by pressing the <Esc> key. 

(Places the cursor at the beginning of the previous sentence (or the previous S-expression if you are in LISP mode). 

)Places the cursor at the beginning of the next sentence (or the next S-expression if you are in LISP mode). 

{Places the cursor at the beginning of the previous paragraph (or at the next list if you are in LISP mode). 

}Places the cursor at the beginning of the next paragraph, at the next section if you are in C mode, or at the next list if you are in LISP mode. 

|Requires a count; the cursor is placed in that column (if possible). 

]]Places the cursor at the next section, or function if you are in LISP mode. 

[[Places the cursor at the previous section, or function if you are in LISP mode. 

Paging and Scrolling

<Ctrl-u>
Scrolls up (default 12 lines).

<Ctrl-d>
Scrolls down (default 12 lines).

<Ctrl-f>
Pages forward one screen.

<Ctrl-b>
Pages backward one screen.

<Ctrl-y>
Scrolls the window up one line.

<Ctrl-e>
Scrolls the window down one line.

<Ctrl-m>
Moves to the first non-white character in the next line.  A count specifies the number of lines to go forward.

<Ctrl-t>
Inserts shiftwidth white space in input mode, if at the beginning of the line or preceded only by white space.  This inserted space can only be backed over using <Ctrl-d>. 

<Ctrl-[>
Cancels a partially formed command; sounds the bell if there is none. In input mode, terminates input mode. When entering a command on the bottom line of the screen (ex command line or search pattern with \ or ?), terminates input and executes command. 

z+Pages up. 

z^Pages down. 

Searching for Patterns

The following commands allow you to search for patterns within a file.  Patterns can be regular expressions as described for grep. 

/patternPlaces the cursor at the next line containing pattern. 

?patternPlaces the cursor at the next previous line containing pattern. 

nRepeats the last search for pattern in the same direction. 

NRepeats the last search for pattern in the opposite direction. 

/pattern/+number
Places the cursor at the numberth line after the line matching pattern. 

?pattern?-number
Places the cursor at the numberth line before the line matching pattern. 

%Finds the parenthesis or brace that matches the one at the current cursor position. 

<Ctrl-t>
Finds the word at the cursor in the tags file then edits the proper file, placing the cursor at the tag.  If the tag is in the current file, moves cursor to it.

Marking and Returning

Enter the following subcommands in Command mode.  You can cancel an incomplete subcommand by pressing the <Esc> key. 

“Moves the cursor to the same cursor position of the previous current line. 

”Moves the cursor to the beginning of the previous current line. 

mxMarks the current position with the letter specified by x. 

‘xMoves the cursor to the same cursor position of line marked x. 

’xMoves the cursor to the beginning of the line marked x. 

Adjusting the Screen

Enter the following subcommands in Command mode.  An incomplete subcommand can be cancelled by pressing the <Esc> key. 

<Ctrl-l>
Clears and redraws the screen.

<Ctrl-r>
Redraws the screen and eliminates blank lines marked with a @. 

z<Return>
Redraws the screen with the current line at the top of the screen.

z-Redraws the screen with the current line at the bottom of the screen. 

z.Redraws the screen with the current line at the center of the screen. 

/pattern/z-
Redraws the screen with the line containing pattern at the bottom. 

znumber<Return>
Makes the window number lines long. 

Adding Text to a File--Text Input Mode

The following subcommands are entered in Command mode and bring the vi editor into Text Input mode to allow you to add text to your file.  End Text Intput mode by pressing the <Esc> key. 

atextInserts text after the cursor. 

AtextAdds text to the end of the line. 

itextInserts text before the cursor. 

ItextInserts text before the first nonspace character in the line. 

oAdds an empty line below the current line. 

OAdds an empty line above the current line. 

Changing Text While in Input Mode

Use the following commands only while in Text Entry mode.  They have different meanings in Command mode. 

<Ctrl-h>
Erases the last character.

<Ctrl-w>
Erases the last small word. (For more information about small words, see the section vi Character Sets.) 

\Quotes the Erase and Kill characters. 

<Esc>Ends insertion, back to Command mode. 

Quit key sequence
Interrupts, terminates insert or <Ctrl-d>. 

<Ctrl-d>
Goes back to the previous autoindent stop. 

^<Ctrl-d>
Ends autoindent for this line only. 

0<Ctrl-d>
Moves the cursor back to the left margin.

<Ctrl-v>
Quotes a nonprinting character.

Changing Text from Command Mode

Use the following subcommands in Command mode.  An incomplete subcommand can be cancelled by pressing the <Esc> key. 

CChanges the rest of the line (c$). 

cMust be followed by a movement command.  Deletes the specified region of text and enters input mode to replace it with the entered text.  If more than part of a single line is affected, the deleted text is saved in the numeric buffers.  If only part of the current line is affected, the last character to be deleted is marked with a $.  A count is passed through to the move command.  If the command is cc, the whole of the current line is changed. 

ccChanges a line. 

cwChanges a word. 

DDeletes the rest of the line (d$) and puts it into the undo buffer. 

dMust be followed by a movement command.  Deletes the specified region of text.  If more than part of a line is affected, the text is saved in the numeric buffers.  A count is passed through to the move command.  If the command is dd, the whole of the current line is deleted. 

ddDeletes a line and puts it into the undo buffer. 

dwDeletes a word and puts it into the undo buffer. 

JJoins lines. 

rxReplaces the current character with the character specified by x. 

ROverwrites characters. 

sSubstitutes characters (cl). 

SSubstitutes lines (cc). 

uUndoes the previous change. 

xDeletes a character. 

XDeletes characters before cursor (dh). 

<<Shifts one line to the left. 

<LShifts all lines from the cursor to the end of the screen to the left.  (The < character describes a range upon which the L subcommand acts.) 

>>Shifts one line to the right. 

>LShifts all lines from the cursor to the end of the screen to the right.  (The > character describes a range upon which the L subcommand acts.) 

~Changes the letter at the cursor to the opposite case. 

Copying and Moving Text

Use the following subcommands in Command mode.  An incomplete subcommand can be cancelled by pressing the <Esc> key. 

p (P)Puts back text in the undo buffer after (before) the cursor. 

Puts back text from the buffer x after (before) the cursor. 

Deletes object into the buffer x. 

yobjectYanks object into the undo buffer (for example, yw to yank a word). 

Yanks object into buffer x. 

YPlaces the line in the undo buffer. 

Restoring and Repeating Changes

Use the following subcommands in Command mode.  An incomplete subcommand can be cancelled by pressing the <Esc> key. 

uUndoes the last command. 

URestores the current line if the cursor has not left the line since the last change. 

.Repeats the last change or increments the np command.  Note that this command is not meant for use with a macro.  Enter @@ to repeat a macro. 

Retrieves the nth last delete of a complete line or block of lines. 

Saving Changes to a File

Use the following subcommands in Command mode.  An incomplete subcommand can be cancelled by pressing <Esc>.  If you are using these subcommands within the ex editor, you do not need to type the : (colon). 

:wWrites the editing buffer contents to the original file. 

:w fileWrites the editing buffer contents to the named file. 

:w! fileOverwrites file with the editing buffer contents. 

Interrupting, Cancelling, and Exiting vi

QEnters the ex editor in Command mode. 

ZZExits vi, saving changes, if any were made. 

:qQuits vi.  If you have changed the contents of the editing buffer, vi displays a warning message and does not quit. 

:q!Quits vi, discarding the editing buffer with no warning. 

:shRuns a shell.  You can return to vi by pressing <Ctrl-d>. 

:w !command
Runs the file through the specified shell command (causes no change to the file).

:!command
Runs command, then returns. 

:!!Repeats the last :!command command. 

n!!command
Executes the shell command identified by command and replaces the number of lines specified by n with the output of command.  If n is not specified, the default is 1.  If command expects standard input, the lines specified are used as input.  (10!!sort sorts the next 10 lines.) 

!linescommand
Works like n!!command, except that lines is a line address (for example, !Gsort sorts the rest of the file). 

Quit key sequence
Interrupts a subcommand.

Editing a Second File

Enter the following subcommands in Command mode.  An incomplete subcommand can be cancelled by pressing the <Esc> key. 

:e fileEdits file.  If you are using this subcommand from the ex editor, you do not need to type the : (colon). 

:e!Reedits the current file and discards all changes. 

:e  +  file
Edits file, starting at the end. 

:e  +number
Edits file, starting at the line number. 

:e # and <Ctrl-a>
Edits the alternate file. The alternate file is usually the the previous current filename. However, if changes are pending on the current file when a new file is called, the new file becomes the alternate file.

:r fileReads the file into the editing buffer by adding new lines below the current line.  If you are using this subcommand from the ex editor, you do not need to type the : (colon). 

:r !command
Runs the shell command identified by command and places its output in the file by adding new lines below the current cursor position. 

:ta tagEdits a file containing tag at the location of tag.  If the tag is in another file and the current file has been changed (and noaw is set), a warning is posted.  To use this command, you must first create a database of function names and their locations using the ctags command.  If you are using this subcommand from the ex editor, you do not need to type the : (colon). 

<Ctrl-t>
Finds the word at the cursor in the tags file and edits the indicated file, placing the cursor at the tag.  Same as :ta, but the tag is the word to the right of the cursor. 

Editing a List of Files

Enter the following subcommands in Command mode. 

:nEdits the next file in the list entered on the command line. 

:n file ...Specifies a new list of files to edit. 

Displaying File Information

Enter the following subcommand in Command mode to show the current filename, the current line number, the number of lines in the file, and the percentage of lines of the file that are before the cursor:

<Ctrl-g>

RELATED INFORMATION

Commands:  ctab(1), ctags(1), ed(1)/red(1), edit(1), ex(1), grep(1)/fgrep(1)/egrep(1), nroff(1)

Files:  ctab(4)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026