home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
editors
/
vi60a1.arj
/
VIMANUAL.DOC
< prev
next >
Wrap
Text File
|
1992-01-04
|
135KB
|
3,895 lines
OAK HILL VI (TM) SHAREWARE MANUAL
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
PLEASE READ THIS LICENSE AGREEMENT AND DISCLAIMER BEFORE USING
OAK HILL VI SHAREWARE. USING THE PROGRAM CONSTITUTES YOUR
ACCEPTANCE OF THE TERMS OF THIS AGREEMENT AND THE ACCOMPANYING
DISCLAIMER.
LICENSE AGREEMENT
1. SHAREWARE: This is shareware. You may try this software and
manual free of charge for thirty days. If you continue to use the
software beyond thirty days, you must register with Oak Hill
software. The registration fee is $60. In return for this fee you
will receive the latest version of the software on disk, a type-set-
quality printed manual, a registration number, and support by mail.
2. COPYING: Whether you decide to keep the software or not, you
may copy the shareware archive file "VI60A1" containing the
programs, manual, and other files and pass it along to others
subject to the following restriction: THE ENTIRE SHAREWARE ARCHIVE
FILE MUST BE COPIED WITHOUT MODIFICATION INCLUDING ALL CONTAINED
FILES, COPYRIGHT, LICENSE, AND LEGAL NOTATIONS. The VI60A1 file
may appear with extension ".ZIP" or ".EXE" or some other extension
depending on the archiving method, which may differ depending on
vendor or BBS sysop preferences.
3. CHARGING FEES: No one other than Oak Hill Software may charge
any fee for the distribution of Oak Hill Vi (TM) without first
obtaining authorization from Oak Hill Software Inc at 73 Hillyer
Circle, Middletown, NJ, 07748, 908-671-8544. This authorization is
automatically granted to distributors recognized by the (ASP) as
adhering to its guidelines for shareware distributors, and such
distributors may begin offering Oak Hill Vi immediately.
4. COMMERCIAL USERS: Commercial users of Oak Hill Vi must register
and pay for their copies of Oak Hill Vi within 30 days of first use
or their license is withdrawn. Site-License arrangements may be
made by contacting Oak Hill Software.
DISCLAIMER
THIS SOFTWARE AND ITS ACCOMPANYING REFERENCE MATERIAL ARE
DISTRIBUTED "AS IS", WITHOUT WARRANTY AS TO THEIR PERFORMANCE,
MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE ENTIRE
RISK AS TO THE RESULTS AND PERFORMANCE OF THE PROGRAM IS ASSUMED BY
THE USER.
NEITHER OAK HILL SOFTWARE, NOR ANYONE WHO SUPPLIES COPIES OF THE
OAK HILL VI SOFTWARE OR MANUAL, SHALL BE LIABLE FOR INDIRECT,
SPECIAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OF THE
PROGRAM OR MANUAL.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 2
OAK HILL VI SHAREWARE REGISTRATION FORM
REMINDER: THIS IS SHAREWARE. IT IS NOT FREE. If you continue to
use the software beyond your 30-day free-trial period, you must
register. If you register you will receive the latest version of
the program on disk, a type-set-quality printed manual, and a
registration number that allows you to receive support-by-mail.
To register, please fill out this form and mail it with check or
money order for $60 (US) to Oak Hill Software at the address below.
Please do not send cash.
NAME:__________________________________________________________
COMPANY:_______________________________________________________
ADDRESS:_______________________________________________________
CITY, STATE, ZIP:______________________________________________
PROGRAM OBTAINED FROM:_________________________________________
COMPUTER BRAND & MODEL:________________________________________
DISK SIZE PREFERRED (5-1/4 or 3-1/2):___________________________
WHERE YOU HEARD ABOUT OAK HILL VI:_____________________________
TODAY'S DATE: _________________________________________________
(6.0A CBIP 92-01-01) Oak Hill Software
73 Hillyer Circle
Middletown, NJ 07748
908-671-8544
COMMENTS OR QUESTIONS:_____________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
___________________________________________________________________
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 3
CONTENTS
====================================================================
1.0 INTRODUCTION .............................................. 4
1.1 GETTING STARTED ....................................... 6
1.2 STANDARD AND COMPACT MODELS OF OAK HILL VI............. 6
1.3 FILE NAMING AND EDITING MULTIPLE FILES ................ 8
1.4 SPECIAL FEATURES FOR LAPTOP PORTABLES ................. 8
1.5 ACKNOWLEDGMENTS ....................................... 9
1.6 REVISIONS, BUGS, AND NEW FEATURES ..................... 9
2.0 COMMAND SUMMARY ........................................... 11
2.1 MOVING AROUND IN YOUR FILE ............................ 11
2.2 FINDING TEXT PATTERNS ................................. 15
2.3 INSERTING AND APPENDING TEXT .......................... 17
2.4 DELETING TEXT ......................................... 17
2.5 CHANGING TEXT ......................................... 18
2.6 YANKING (COPYING) TEXT INTO YANK/DELETE BUFFER ........ 21
2.7 OTHER TEXT MODIFICATION COMMANDS ...................... 22
2.8 WRITING, READING AND EXITING COMMANDS ................. 27
2.9 OPTION-SETTING AND OTHER COMMANDS ..................... 31
2.10 IBM EDIT KEYS ........................................ 39
3.0 LINE RANGE SPECIFICATION .................................. 41
4.0 TEXT FILL AND CENTERING FEATURES .......................... 42
4.1 TEXT FILL FEATURE ..................................... 42
4.2 TEXT CENTERING FEATURE................................. 44
5.0 SETUP FILE "EXRC" AND THE "EXINIT" ENVIRONMENT VARIABLE ... 45
6.0 MEMORY AND FILE SIZE CONSIDERATIONS ....................... 47
7.0 "SLICE" UTILITY PROGRAM ................................... 49
8.0 "PAGE" TEXT PROCESSING PROGRAM ............................ 51
9.0 OAK HILL Vi (TM) AND UNIX (TM ) Vi ........................ 53
10.0 MISCELLANEOUS INFORMATION ................................ 53
11.0 COMMAND INDEX AND QUICK REFERENCE ........................ 57
====================================================================
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 4
1.0 INTRODUCTION
======================================================================
Thank you for trying Oak Hill Vi (TM). This reference document
introduces the program and lists the commands available on the
current version.
Oak Hill Vi is designed to work on the IBM PC/XT/AT, IBM PS/2,
and virtually all IBM Compatibles. (See following section for some
possible exceptions.)
Oak Hill Vi provides a large subset of the the standard UNIX
(UNIX is a trademark of AT&T) vi editor capabilities, and within
that subset attempts to mimic the command syntax and operation of
the UNIX vi editor as closely as possible. It also provides
paragraph formatting, line centering, and case conversion features
not found in standard UNIX vi.
If you do not already know how to use a vi editor, a good way to
learn is to work through the commands on a practice file. Don't be
intimidated by the long list of commands -- no one uses all of
them, and many are just synonyms for other commands. If you are
uncertain which commands to learn first, we recommend that you
start with those that marked with an arrow "->" in the margin.
While editing preferences vary from person to person, these are
among the most commonly used vi commands. Whether you are a
beginner or an advanced user, you should find the Command Index
and Quick Reference in Section 11 to be useful.
Beginners who would like a formal tutorial should consult standard
UNIX literature and primers on vi. One good source is "Editing
in a UNIX Environment -- The vi/ex Editor", by Mohammed el Lozy,
Prentice Hall, 1985.
REMINDER: THIS IS SHAREWARE. IT IS NOT FREE. If you continue to
use the software beyond your 30-day free-trial period, you must
register. If you register you will receive the latest version of
the program on disk (with no shareware reminder notices or pauses),
a type-set-quality printed manual, and a registration number that
allows you to receive support-by-mail. See the registration form
above.
Whether or not you continue to use the software (and therefore
register), you are free to pass along the shareware archive file
VI60A1.XXX to others or to upload it to any bulletin board system
(BBS). Note that the ".XXX" extension may be ".ZIP" or ".EXE" or
some other extension depending on the archiving method preferences
of vendors or BBS sysops. Note also that you may pass along ONLY
the original unmodified VI60A1 file. If you do not have that file,
you may download it from the CompuServe IBMAPP Forum, Text Editor
section. It is the intention of Oak Hill Software to keep an
updated shareware "ZIP" file in that location.
A Commercial shrink-wrap version of Oak Hill Vi, called
"Personal Vi" is available in a standard shrink-wrap software
binder from Advantage Software, 1-800-333-3141, Master Card &
Visa accepted. Corporate purchasers may call Voyager/Corsoft
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 5
at 908-389-1700. Or you may call Oak Hill Software directly
at 908-671-8544.
NOTICE: Oak Hill Software, Inc. is a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that the
shareware principle works for you. If you are unable to resolve a
shareware-related problem with an ASP member by contacting the
member directly, ASP may be able to help. The ASP Ombudsman can
help you resolve a dispute or problem with an ASP member, but does
not provide technical support for members' products. Please write
to the ASP Ombudsman at 545 Grover Road, Muskegon MI 49442-9427or
send a CompuServe message via easyplex to ASP Ombudsman 70007,3536
Oak Hill Software, Inc.
73 Hillyer Circle
Middletown, NJ 07748
908-671-8544
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 6
1.1 GETTING STARTED
--------------------------------------------------------------
To get started, simply copy the shareware file VI60A1.ZIP to a
convenient directory and use an unzipping program (such as PKUNZIP)
to extract the files listed in the table below. If you have the
self-extracting shareware file VI60A1.EXE, you need only execute
this file to extract the files listed below. If VI60A1 appears
with some other extension, follow the instructions of the BBS sysop
or vendor from whom you obtained the file.
FILE PURPOSE
-----------------------------------------------------------
VIMANUAL.DOC This manual text file
VI_STD.EXE Oak Hill Vi Standard Model (Video-RAM version)
VI_CMP.EXE Oak Hill Vi Compact Model (ANSI.SYS version)
EXRC.SMP Sample IBM/Compatible Setup File
VIHELP.TXT Text File Needed For On-Line Help
SLICE.EXE A utility program to help view and "slice up"
large files (Section 6)
PAGE.EXE A utility program to produce "paged"
output for simple word processing (Section 7)
CR_CRLF.EXE A utility program to convert non-standard
text files to standard DOS ASCII files
TRANS.PVI Sample character translation table for use
with PAGE.EXE
EXTASCII.TBL File containing table of extended ASCII characters
128 through 255 (decimal)
EXTASCII.MP! Sample "map!" keyboard macros for non-English
character support
VIREADME.DOC File containing latest Oak Hill Vi information
VENDOR.DOC File with information for software distributors
SYSOPBBS.DOC File with information for BBS Sysops
PACKING.LST File with list of files included in VI60A1
REGISTER.DOC File with form and information on registering
For IBM and most compatible computers, simply copy VI_STD.EXE into
your working directory or "BIN" directory and give it a convenient
name such as VI.EXE. We recommend that you also copy the sample
EXRC file provided, although it is not required.
For example, for an IBM PC/XT/AT, PS/2 or compatible, assuming
the expanded files are on a disk in drive A and your hard disk
is drive C, the commands would be
COPY A:VI_STD.EXE C:\BIN\VI.EXE
COPY A:EXRC.SMP C:\BIN\EXRC
COPY A:VIHELP.TXT C:\BIN\VIHELP.TXT
To edit a file called "foo", simply issue the command "VI FOO".
If you have difficulty making VI_STD.EXE work, it could be
that your computer is a (now-rare) machine that is not
video-RAM compatible with the IBM. In that case, first try
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 7
putting the command ":set vid=bios" in your EXRC file. This
will used BIOS commands instead of video-RAM commands. If
that fails, try the VI_CMP.EXE version as outlined below.
This version uses the ANSI.SYS driver and should work with any
machine ever advertised as "IBM Compatible". If you have
continued difficulty, please contact Oak Hill Software.
1.2 STANDARD AND COMPACT MODELS OF OAK HILL VI
---------------------------------------------------------------------
In most cases you should use the Standard Model of Oak Hill Vi,
VI_STD.EXE. The Standard Model produces fast screen updates
and allows you to edit large files (up to 250,000 characters).
However, in some situations, you may prefer the Compact Model, as
described below.
The Compact Model, VI_CMP.EXE, contains all the commands and
features of the Standard Model (except 43/50 line display
capability), while occupying 35% to 40% less disk space. This can
be an advantage if disk space is at a premium, as it is in some
laptop computers with RAM disks. The Compact Model may also be the
appropriate choice if you plan to use Oak Hill Vi in conjunction
with Terminate-and-Stay-Resident programs (see Section 6.0).
Furthermore, the Compact Model should work with any computer that
is advertised as "IBM-Compatible", including older machines that
may not be 100% compatible with the IBM video RAM.
The disadvantages of the Compact Model are that (1) it cannot edit
files as large as those for the Standard Model, (2) it produces
slower screen updates than the Standard Model, and (3) it takes
longer to load and execute than the Standard Model.
To use the Compact Model, you MUST have the line
DEVICE=ANSI.SYS
in a CONFIG.SYS file in the root directory of the MS-DOS disk you
use to boot your system. Likewise, the driver ANSI.SYS, supplied
with your DOS disk, must be in that same directory.
A simple way to add the required line to CONFIG.SYS is to enter the
root directory on the disk that you use to boot your system and
enter the following:
type con >> config.sys
device=ansi.sys
ctl-z
(The last line is a single "control-Z" character). This will append
the necessary line to an existing CONFIG.SYS file (or create a
CONFIG.SYS file if one does not exist).
Oak Hill Vi does all editing on buffers stored in a core
memory "heap". Except when reading and writing files, accessing
the "help" capability, or when using external filters via the '!'
command, the program does not access disk storage. This has the
advantage of making the program very fast, as well as reducing the
power consumption and noise level in battery-powered lap-top
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 8
portable computers with floppy disk drives. It has the
disadvantage of limiting the maximum-size file you can edit.
The maximum file sizes that can be edited with the two models are
as follows --
Approximate Available
Max File Size Machine Memory
---------------------------------------------------------
Standard Model 250,000 characters 640K bytes
Compact Model 35,000 characters 140K bytes
The two Models are identical except for the maximum amount of
memory "heap" that each program can manage for buffer storage of
the file you are editing. Because the Compact Model addresses
memory with 16-bit pointers, it can address no more than 64K of
heap. This makes the program more compact to store than on the
Standard Model. The Standard Model uses 32-bit pointers to address
memory, making it larger to store. The Compact Model saves still
more space by using a special encoding algorithm to reduce the size
of the .EXE file. It takes slightly longer to load because it must
first "expand" itself to a normal .EXE file.
The Standard Model requests memory from DOS only as it is needed to
accommodate your file. You do not need 640K to run the Standard Model
unless you are editing very large files! The Compact Model requests
64K of memory as soon as it is loaded.
For extended editing on a very large file, it is good practice with
any editor to cut the file into smaller segments. Public-domain
"SPLIT" utilities or the "SLICE" utility provided with Oak Hill Vi
helps you do that. See Section 7.
1.3 FILE NAMING AND EDITING MULTIPLE FILES
---------------------------------------------------------------------
When you issue the command "VI FILENAME", you may list more than
one FILENAME (separated by spaces) and you may use DOS file name
conventions, including the use of "wildcard" characters like '*'
and '?'. If more than one file is implied, as it might be in "VI
*.C" for example, you may edit each of these in turn using the
":n<cr>" command.
You may see the list of files in the queue with the ":args<cr>"
command -- the current file name will be listed with square
brackets around it. You may return to the first file in the queue
with the ":rew<cr>" command, and you may edit any file without
disturbing the queue with the ":e filename<cr>" command. Any
number of files can be placed in the editing queue.
If you enter the command ":n FILENAME<cr>", you will establish
a file name queue, and the first file in the FILENAME list will
be loaded and ready for editing.
1.4 SPECIAL FEATURES FOR LAPTOP PORTABLES
---------------------------------------------------------------------
If you are using Oak Hill Vi on a laptop portable, you should
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 9
make special note of two user-requested features that have proven
very popular.
First, the ":set nobeep" option allows you to replace the usual vi
audible beep tone with a highlighted "BEEP!" flag at the bottom of
your screen. This makes it easier to use your laptop on an
airplane where the beep may be difficult to hear, or in a meeting
room where an audible beep would disturb others in the room.
Second, on some laptops that use non-backlit LCD displays (like the
original Toshiba 1000), it can be difficult to find the flashing
underscore cursor on the screen, especially when the ambient
lighting is poor. The ":set cursor = box" option allows you to
substitute a flashing box cursor for the underscore -- this is much
easier to find. The default cursor is an underscore in command mode
and a box cursor in input mode.
If you find yourself making frequent use of these or other options,
don't forget to install the commands in a EXRC file so that they
will be automatically invoked every time you start Oak Hill Vi.
See Section 5.0.
1.5 ACKNOWLEDGMENTS
---------------------------------------------------------------------
Oak Hill Vi uses a modified version of Henry Spencer's public-domain
regular expression matching routines. All other code in Oak Hill Vi
is original.
Oak Hill Vi would never have been completed had it not been
for an enthusiastic group of users and "beta-testers". In
particular, Rich Baseil, Rich Ditch, Wayne Felts, Bill Mayer,
Ron McConnell, Bob Lawrence, Nick Leverton, Mike Slomin, and
Mitch Wyle provided valuable comments.
1.6 REVISIONS, BUGS, AND NEW FEATURES
---------------------------------------------------------------------
Based on requests fro users, version 6.0 of Oak Hill Vi
contains many revisions and new features since the last
release of Oak Hill Vi (Versions 5.6 and 5.7). Among these
are:
. 43/50-line capability for EGA/VGA machines
. On-line help
. Improved macro capabilities, including full map, map!, and abbrev
. Extended and faster regular expression matching
. Additional :ex commands, including :e #
. Tags capability
. Redefinable cursor-control keys
. Support for full 8-bit ASCII character set (includes international
characters, line-drawing set, etc.)
. Register commands @x and @@
. Video control via direct Video-RAM or BIOS routines
. Improved cursor appearance (clean underscore or box on all machines)
. U, ctrl-^, [[, ]], and other vi commands added
If you find a bug in the program or you would like to see a feature
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 10
added to the program, please let us know by mail. Please supply as
much information about bugs as you can. (It cannot be investigated
here if we can't recreate it!) If you are among the first three
users to find a bug that is corrected in a later version, or among
the first three to make a suggestion that is incorporated in a
later version, you will receive a free copy of the revised version.
Oak Hill Software
73 Hillyer Circle
Middletown, NJ 07748
908-671-8544
_______
____|__ | (R)
--| | |-------------------
| ____|__ | Association of
| | |_| Shareware
|__| o | Professionals
-----| | |---------------------
|___|___| MEMBER
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 11
2.0 COMMAND SUMMARY
======================================================================
In the list below, many of the commands may be preceded by an
optional repetition number. To do so is the equivalent of entering
the command n times. For example, the command "4h" will move the
cursor left four characters instead of just one. The syntax
of these commands is illustrated in each case with the example
of n=4.
<ctl-X> indicates that the control key is to be held down at the
^X same time the indicated character X is depressed. An
alternative way of showing this is with the notation ^X.
<cr> denotes a carriage return.
<sp> denotes a space
<esc> denotes an escape character
Items enclosed in [] brackets are optional.
A "white" or "white space" character is a space or tab character.
-> Commands that are marked with an arrow "->" in the left margin are
the most commonly used vi commands. If you are a beginner, we
recommend that you practice these commands first.
2.1 MOVING AROUND IN YOUR FILE
----------------------------------------------------------------------
-> h 4h Move cursor left 1 or 4 characters on current line
-> l 4l Move cursor right 1 or 4 characters on current line
-> k 4k Move cursor up 1 or 4 lines in current column
-> j 4j Move cursor down 1 or 4 lines in current column
-> 0 Move cursor to first character in current line
-> $ Move cursor to last character in current line
| 4| Move cursor to char closest to 1st or 4th column
Note: In the commands below: a "word" is a
string of characters separated by white space
or by punctuation marks. A "WORD" is a string
of characters separated by white space.
-> w 4w Move ahead 1 or 4 words
-> W 4W Move ahead 1 or 4 WORDS
-> b 4b Move back 1 or 4 words
-> B 4B Move back 1 or 4 WORDS
-> e 4e Move ahead to 1st or 4th end-of-word character
-> E 4E Move to end of 1st or 4th end-of-WORD character
-> <ctl-D> 8<ctl-D>
Scroll down lines
-> <ctl-U> 8<ctl-U>
Scroll up lines
The default number of lines scrolled is
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 12
half the screen size in lines (e.g, 12
lines for a 25-line screen). If an
integer, for example 8, precedes the
command, the number of lines scrolled will
be 8 and the default thereafter will be 8.
If the screen size is changed (with the
":set lines" command), the number will be
reset to the default. In the current
version, the integer can be no larger than
larger than half the screen size in lines.
If a larger value of n is specified, it
will be reduced to half the screen size.
-> <ctl-F> 4<ctl-F>
Jump ahead 1 or 4 screenfulls (when jumping 1
screenfull, retain 2 lines for continuity)
-> <ctl-B> 4<ctl-B>
Jump back 1 or 4 screenfulls (when jumping 1
screenfull, retain 2 lines for continuity)
-> G Jump ahead to end of file
nG Jump directly to line number n
-> 'x Jump to start of line marked "x" (see "m" command)
`x Like 'x but also jumps to marked cursor location
'' Jump to start of line that cursor was on before last
"big move" (more than a screenfull away)
`` Like '' but also jumps to marked cursor location
within the line
- 4- Move up 1 or 4 lines to 1st non-white char in line
+ 4+ Move down 1 or 4 lines to first non-white character
^ Move to first non-white character in current line
<cr> 4<cr> Move down 1 or 4 lines to 1st non-white char in line
<sp> 4<sp> Move right 1 or 4 chars on current line (same as "4l")
Note: In the commands below:
A "word" is a string of letters separated by
white space or by punctuation marks.
A "WORD" is a string of letters separated by
white space.
) 4) Move ahead 1 or 4 sentences
( 4( Move back 1 or 4 sentences
Note: A '.' followed by two spaces or a
'.' as the last non-white character on a
line is interpreted as the end of a
sentence. This search command does not
wrap around the beginning or end of the
file.
} 4} Move ahead 1 or 4 paragraphs
{ 4{ Move back 1 or 4 paragraphs
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 13
Note: A paragraph is a section of text
delimited by blank lines, the start or
end of a file, lines that begin with a
space or any of the characters: .-_=*
or a <ctl-X>.
]] 4]] Move ahead 1 or 4 sections
[[ 4[[ Move back 1 or 4 sections
Note: A "section" begins on a line that has
a '{' character in the first position. A
section also begins on any line that has a
'.' character in the first position and is
followed by a pair of characters from the
"sections" string. By default this string
is "SHNHH HU". Thus a section would begin
a line that starts with ".SH", or ".HU", or
".H". You may change the default with the
":set sections" command.
<ctl-E> 4<ctl-E>
Scroll down 1 or 4 lines, keeping current
cursor position if possible
<ctl-Y> 4<ctl-Y>
Scroll up 1 or 4 lines, keeping current cursor
position if possible
H Jump to first line on screen
M Jump to middle line on screen
L Jump to last line on screen
z<cr> Redraw screen with current line at top of screen.
z+ Same as above.
z. Redraw screen with current line at middle of screen.
z- Redraw screen with current line at bottom of screen.
If an integer, for example 6, precedes any
of the three 'z' commands above, any of
the three commands above, the screen will
be drawn about line <n> rather than
the current line.
'?', the search direction will be reversed.
% Starting from either a ( or { character, jump
forward to the matching ) or }. Starting
from ) or } jump back to the matching ( or {.
Any of the characters (){} that are within
quotation marks are ignored.
:[range]p<cr> Print command. Prints all lines in
specified range.
EXAMPLES:
:g/string/p<cr> prints all lines that
contain "string"
:.,$p<cr> prints all lines from cursor
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 14
to end of file
:spec1<cr> Cursor moves to line number "spec1". See "LINE RANGE"
(Section 3) below for a description of what
"spec1" may be.
EXAMPLES:
:35<cr> jump to line 35
:$-44<cr> jump to 44th line
above last line
Note: This is one of a series of "ex" commands
that are available in UNIX vi through the
colon ":" commands. This particular command
has limited usefulness. The first example above
is equivalent to the vi command "35G", which
is quicker to type. The second command does
have some value since it is slightly simpler
than the vi equivalent "G44k".
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 15
2.2 FINDING TEXT PATTERNS
----------------------------------------------------------------------
-> /pattern/<cr> Jump to next occurrence of string "pattern"
-> ?pattern?<cr> Jump to previous occurrence of string "pattern"
(If, before you hit the <cr>, your wish
to cancel the pattern search, you can
backspace over the '?' or '/' character
and the cursor will return to the text.
The trailing '/' or '?' after 'pattern'
is optional.)
-> /<cr> Jump to next occurrence of last requested "pattern"
-> ?<cr> Jump to previous occurrence of last requested "pattern"
In "pattern" allowable meta characters are:
. matches any character
^ matches the beginning of a line
$ matches the end of line
x* matches zero or more consecutive characters 'x'
.* matches zero or more occurrences of any character
x\+ matches one or more consecutive characters 'x'
x\? matches zero or one occurrences of character 'x'
[xyz] matches any single char in the string 'xyz'
[^xyz] matches any single char except those in
the string 'xyz'
[a-z] matches any char between 'a' and 'z' inclusive,
[^a-z] matches any char but those between 'a' and 'z'
\ preceding a meta char removes its meta meaning.
\( \) used to delimit subexpressions; see string
substitutions, Section 2.7
| used to separate "branches"; for example
/pattern1|pattern2|pattern3/
will match pattern1, or pattern2, or pattern3.
see also Section 2.7
/pattern/z<cr> Redraw screen with next occurrence of string "pattern"
/pattern/z.<cr> at the top, middle, or bottom of the screen (as
/pattern/z-<cr> above). If the '/' delimiters are replaced by
-> n Repeat last pattern search
-> N Repeat last pattern search but reverse search direction
-> fx 4fx Move ahead to 1st or 4th occurrence of character 'x'
on current line
-> Fx 4Fx Move back to 1st or 4th previous occurrence of
character 'x' on current line
-> ; 4; Repeat last fx or Fx command 1 or 4 times
-> , 4, Repeat last fx or Fx command 1 or 4 times,
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 16
but reverse search direction
tx 4tx Move ahead to 1st or 4th char preceding next
occurrence of char 'x' on current line
Tx 4Tx Move back to 1st or 4th character following previous
occurrence of char 'x' on current line
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 17
2.3 INSERTING AND APPENDING TEXT
-----------------------------------------------------------------------
-> <esc> End text modification and return to command mode
(See also the ":set esc2<cr>" command)
-> u Undo the last text modification change
U Undo all text modification changes on current line
only. For example "xxx" will delete three
successive characters. "U" will undo all
three changes. This will not work once you
have moved off the line.
-> . Repeat the last text modification change
-> a Append text until <esc>
-> A Append text at end of line until <esc>
-> i Insert text until <esc>
-> I Insert text at beginning of line until <esc>
-> o Open file below current line and insert text until <esc>
-> O Open file above current line and insert text until <esc>
-> <ctl-H> Backspace (and erase) one character
Some keyboards have an explicit "backspace"
key which you may also use. On some
keyboards you may also use the "delete"
key. This varies from machine to machine.
-> <ctl-W> Backspace (and erase) one word
to protect text entered from previous text
modification commands, neither of these
commands will backspace beyond the point
where the currently active text insertion
code was issued. Attempting to backspace
any further causes a "beep".
<ctl-V> Accept next character literally; ignore special meaning
(allows entry of <ctl-H>, <ctl-W>, or
<esc> char)
2.4 DELETING TEXT
-----------------------------------------------------------------------
-> D Delete remaining text in current line
d$ Delete remaining text in current line
-> dd 4dd Delete 1 or 4 lines
-> dG Delete current line through last line in file
-> dw 4dw Delete ahead 1 or 4 words
-> dW 4dW Delete ahead 1 or 4 WORDS
-> de 4de Delete 1 or 4 words up to the last char
-> dE 4dE Delete 1 or 4 WORDS up to the last char
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 18
db 4db Delete back 1 or 4 words
dB 4dB Delete back 1 or 4 WORDS
dl 4dl Delete 1 or 4 characters
dfx 4dfx Delete characters from cursor position to 1st or 4th
next occurrence of char 'x'
dFx 4dFx Delete characters from cursor position to 1st or 4th
previous occurrence of char 'x'
dtx 4dtx Delete characters from cursor position up to character
preceding 1st or 4th next occurrence of char 'x'
dTx 4dTx Delete characters from cursor position to character
following 1st or 4th previous char 'x'
d) 4d) Delete from cursor position forward to end of 1st
or 4th sentence
d( 4d( Delete from cursor position backward to start
of 1st or 4th previous sentence
d} 4d} Delete from cursor position forward to end of
1st or 4th paragraph
d{ 4d{ (This command is not implemented in current version
of Oak Hill Vi)
dj 4dj Delete current line, or delete current line plus
4 lines below current line
dk 4dk Delete current line, or delete current line plus
4 lines above current line
dl 4dl Delete character at current cursor position (equiv
to command "x"), or delete 4 characters
dh 4dh Delete character to left of cursor, or delete 4
characters to left of cursor
Note: If you prefer an alternative syntax, you
may invert the integer multiplier and the "d"
operator in the above commands. For example,
"d4j" is equivalent to "4dj".
d0 Delete from beginning of line through cursor position
-> d'x Delete text delimited by current line and
line 'x (see "mx" command, Section 2.7)
d`x Delete text delimited by cursor position and
position `x
d4G Delete line number 4 through the current line
[range]d Delete lines specified in "range" -- see
"LINE RANGE" below (Section 3)
2.5 CHANGING TEXT
-----------------------------------------------------------------------
Note: "Changing" text is like "deleting"
text except that as soon as you've deleted
the text, the program is in the input mode,
waiting for you to type in the replacement text.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 19
-> C Change remaining text in current line
c$ Change remaining text in current line
-> cc 4cc Change 1 or 4 lines
-> cG Change current line through last line in file
-> cw 4cw Change 1 or 4 words forward in file
-> cW 4cW Change 1 or 4 WORDS forward in file
-> ce 4ce Change 1 or 4 words up to the last char
-> cE 4cE Change 1 or 4 WORDS up to the last char
cb 4cb Change 1 or 4 words backward in file
cB 4cB Change 1 or 4 WORDS backward in file
cl 4cl Change 1 or 4 characters
cfx 4cfx Change characters from cursor position to 1st or 4th
next occurrence of char 'x'
cFx 4cFx Change characters from cursor position to 1st or 4th
previous occurrence of char 'x'
ctx 4ctx Change characters from cursor position up to character
preceding 1st or 4th next occurrence of char 'x'
cTx 4dTx Change characters from cursor position to character
following 1st or 4th previous char 'x'
c) 4c) Change from cursor position forward to end of 1st
or 4th sentence
c( 4c( Change from cursor position backward to start
of 1st or 4th previous sentence
c} 4c} Change from cursor position forward to end of
1st or 4th paragraph
c{ 4c{ (This command is not implemented in current version
of Oak Hill Vi)
cj 4cj Change current line, or change current line plus
4 lines below current line
ck 4ck Change current line, or change current line plus
4 lines above current line
cl 4cl Change character at current cursor position (equiv
to command "x"), or change 4 characters
ch 4ch Change character to left of cursor, or change 4
characters to left of cursor
Note: If you prefer an alternative syntax, you
may invert the integer multiplier and the "c"
operator in the above commands. For example,
"c4j" is equivalent to "4cj".
c0 Change from beginning of line through cursor position
-> c'x Change text delimited by current line and
line 'x (see "mx" command, Section 2.7)
c`x Change text delimited by cursor position and
position `x (see "mx" command, Section 2.7)
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 20
c4G Change line number 4 through the current line
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 21
2.6 YANKING (COPYING) TEXT INTO YANK/DELETE BUFFER
-----------------------------------------------------------------------
Note: When you "yank" or "delete" text, you
copy it into a temporary buffer. You may then
"put" or "paste" (see "p" and "P" commands
below) this text at some other point in the
file.
Y 4Y Yank remaining text in current line
-> yy 4yy Yank 1 or 4 lines
-> y$ Yank remaining text in current line
-> yG Yank current line through last line in file
-> yw 4yw Yank ahead 1 or 4 words
-> yW 4yW Yank ahead 1 or 4 WORDS
ye 4ye Yank 1 or 4 words up to the last char
yE 4yE Yank 1 or 4 WORDS up to the last char
yb 4yb Yank back 1 or 4 words
yB 4yB Yank back 1 or 4 WORDS
yl 4yl Yank 1 or 4 characters
yfx 4yfx Yank characters from cursor position to 1st or 4th
next occurrence of char 'x'
yFx 4yFx Yank characters from cursor position to 1st or 4th
previous occurrence of char 'x'
ytx 4ytx Yank characters from cursor position up to character
preceding 1st or 4th next occurrence of char 'x'
yTx 4yTx Yank characters from cursor position to character
following 1st or 4th previous char 'x'
y) 4y) Yank from cursor position forward to end of 1st
or 4th sentence
y( 4y( Yank from cursor position backward to start
of 1st or 4th previous sentence
y} 4y} Yank from cursor position forward to end of
1st or 4th paragraph
y{ 4y{ (This command is not implemented in current version
of Oak Hill Vi)
yj 4yj Yank current line, or yank current line plus
4 lines below current line
yk 4yk Yank current line, or yank current line plus
4 lines above current line
yl 4yl Yank character at current cursor position (equiv
to command "x"), or yank 4 characters
yh 4yh Yank character to left of cursor, or yank 4
characters to left of cursor
Note: If you prefer an alternative syntax, you
may invert the integer multiplier any the "y"
operator in the above commands. For example,
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 22
"y4j" is equivalent to "4yj".
y0 Yank from beginning of line through cursor position
y'x Yank text delimited by curr line and
line 'x (see "mx" command, Section 2.7)
y`x Yank text delimited by cursor position and
position `x
y4G Yank line number 4 through the current line
2.7 OTHER TEXT MODIFICATION COMMANDS
-----------------------------------------------------------------------
-> r Replace single character and return to command mode
-> R Replace text on current line ("overstrike") until <esc>
-> s 4s Substitute new characters for current character
until <esc>
-> S 4S Substitute new characters for current line until <esc>
-> x 4x Delete 1 or 4 characters
X 4X Delete 1 or 4 character before the cursor
-> p Put last deleted/yanked lines below current line
-> p Put last deleted/yanked text after current
cursor position
-> P Put last deleted/yanked lines above current line
-> P Put last deleted/yanked text before current
cursor position
Note: Whether "text" or "lines" apply in the
"put" commands above depends on whether
a text string or text lines were yanked,
deleted, or stored into the yank/delete
buffer.
-> J Join the current and following line into a single line
~ Change case of character at cursor location and
advance to next character. (Undo doesn't
work for this command; this command is
its own undo.)
>> 4>> Shift 1 or 4 lines one tab-shift to the right
<< 4<< Shift 1 or 4 lines one tab-shift to the left
>adr Shift from current line through "adr" one tab-shift
to the right
<adr Shift from current line through "adr" one tab-shift
to the left
EXAMPLES:
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 23
>'a
</howdy/
<73<cr>
The first example will right-shift each line
of text from the current line through the
one marked "a" (see the "mark" command).
The second example will left-shift each
line of text from the current line through
the one where the string "howdy" appears.
The third example will left-shift each
line of text from the current line through
line number 73.
:abbr [_label] lhs rhs<cr>
:unabbr lhs<cr>
:abbr<cr>
Abbreviate 'rhs' with 'lhs' while in input mode.
Every time the string 'lhs' is entered by itself
(surrounded by spaces, tabs, carriage returns, or
punctuation marks like .,!? etc), it will be
replaced by 'rhs', just as if you had typed 'rhs'
instead of 'lhs'.
EXAMPLE: If you type --
:abbr rr requirements<cr>
then thereafter, while in the input mode, you type
we wrote new rr for the client
as soon as the space after 'rr' is typed, the 'rr'
will be replaced by 'requirements', leaving you with
we wrote new requirements for the client
This capability is good for frequently typed, lengthy
words.
The :unabbr command cancels the :abbr command with
the specified 'lhs'.
There is no limit to the number of abbreviations
you may have active at any time. 'rhs' and 'lhs'
are limited to 127 characters. You may see the
abbreviations you have active by entering
":abbr<cr>" (or simply ":ab<cr>" with no arguments.
Finally, ":abbr" may itself be abbreviated to ":ab".
-> :[range]s/string1/string2/[g][p]<cr>
String substitution command. For the range of
lines indicated (see "Line Ranges", Section 3),
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 24
substitute first occurrence of string1 with
string2. If the optional 'g' appears after the '/'
that follows string2, every occurrence of string1
(not just the first) will be replaced by string2.
If the 'p' option appears, each altered line
will be printed at the bottom of the screen.
If no range of lines is indicated, substitutions
will take place on the current line only.
The '/' delimiter character may be any character
that does not appear in string1 or string2.
(The only exception is that if no line specification
is supplied, the string delimiter character must
be a '/' to avoid ambiguity).
String1 may contain meta characters.
The trailing '/' delimiter after string2 is optional.
A '&' in string2 will be replaced by all of string1.
Use '\&' if you want to insert a literal '&' character.
The "undo" command will "undo" the substitutions
made by this command only if there is sufficient
room in memory to store the range of lines selected.
If there is not sufficient room, the substitutions
can still be made, but a warning message will be
printed first.
EXAMPLES:
:s/sam/bill<cr>
:%s/bcr/Bell Communications Research/g<cr>
:.,$s/^/ /<cr>
:'a,'bs/ *$//<cr>
:g/howdy/s//doody/gp<cr>
The first example will substitute "bill" for
the first occurrence of "sam" on the current line
The second example will substitute "Bell Communications
Research" for "bcr" for every line in the file.
The third example will put five spaces at the
front end of the current line through the last
line of the file.
The fourth example will remove (by substituting
nothing for) all trailing spaces from the end
of lines marked 'a' through 'b'.
The fifth example will replace all occurrences
of "howdy" by "doody" and will print each line
altered at the bottom of the screen.
If portions of string1 are bracketed by the quoted
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 25
parenthesis pairs as in
anythinga\(seg1\)anythingb\(seg2\)
then a \1 and \2 in string2 would be replaced by
seg1 and seg2 respecitively. Up to 9 such strings
could appear.
For example, if the first two lines of text were:
red are roses
blue are violets
Then the command
:1,2s/\(.*\) are \(.*\)/\2 are \1/
would convert the text to:S
roses are red
violets are blue
& Repeat the last :[range]s command for the current
line only.
:[range]d<cr> Deletion command. Will delete lines in specified
range.
EXAMPLES:
:/string/d<cr> deletes next line in which "string"
appears
:g/string/d<cr> deletes all lines in which "string"
appears
:g/^$/d<cr> deletes all blank lines
:[range]t[spec]<cr>
Transfer command. Copies lines in specified
[range] and inserts the copied lines just below
the line named in [spec]. This is a UNIX "ed"
or "ex" command. Note you can do the same
thing with "yank" and "put" commands.
EXAMPLES:
:15,20t35<cr> Copies lines 15 through 20 and
inserts them just below line 35.
:/Sam/,/Bill/t/Dave/<cr>
Copies lines from the one
containing "Sam" through the
one containing "Bill" and
inserts them just below the
line containing "Dave".
:[range]m[spec]<cr>
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 26
Move command. Deletes lines in specified
[range] and inserts the deleted lines just below
the line named in [spec]. This is a UNIX "ed"
or "ex" command. Note you can do the same
thing with "delete" and "put" commands.
EXAMPLES:
:1,.m$<cr> Deletes lines 1 through the
current line and moves them
to the bottom of the file.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 27
2.8 WRITING, READING, AND EXITING
-----------------------------------------------------------------------
-> ZZ Write out (save) current buffer & quit editor.
:x filename Same as ZZ command, but write buffer to "filename"
:x! filename and quit. If :x! is used then overwrite "filename"
if it exists. If "filename" is missing, current
file name is assumed.
-> :w<cr> Write buffer out (save) to default file name.
:wq<cr> Write buffer out (save) to default file name
and quit editor.
-> :w filename<cr> Write buffer out to "filename". This command will
not overwrite an existing already file
with the same name.
-> :w! filename<cr>
Write buffer out to "filename" unconditionally. This
command will overwrite an already existing
file with the same name.
-> :q<cr> Quit editor and return to MS-DOS. For safety,
the editor will not quit unless you have
written out the buffer since the last
change was made.
-> :q!<cr> Quit editor unconditionally and return to MS-DOS.
Any editing changes since your last "write"
will be lost.
-> :r filename<cr> Read "filename" into buffer following the current line.
You may use wildcard characters in "filename",
but only the first matching file will be read.
:e filename<cr> Dump current file buffer and edit "filename".
No "filename" will cause current filename
to be used. For safety, command is
rejected if the buffer has been altered
since the last write to disk. This
command, as well as "e!" and "we" will
clear the (unnamed) yank/delete buffer and
the buffer used to store the
repeat-last-command command ("."). You may
use wildcard characters in "filename", but
only the first matching file will be
honored.
:e! filename<cr>
Dump current file buffer and edit "filename"
(unconditionally).
:we filename<cr>
(NON-UNIX) Write out current buffer to disk,
dump buffer, and begin editing "filename"
:e #<cr> In any of the :e, :e!, or :we commands, the
:e %<cr> character % is a synonym for the current
<ctl>^ file, and # is a synonmym for the previous
file, where the previous file is the file
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 28
edited (if any) before the current file.
Note that the command :e # (or equivalently
<ctl>^) will allow you to flip back and
forth between two files of interest. Cursor
positions in each file are preserved.
(Note that on most IBM-type keyboards, the
<ctl>^ is executed by holding down both
the ctl and shift keys and pressing the
'6' key.
:[range]w[>>] filename<cr>
Write [and append] command with optional line range
specification (see Line Range discussion) --
if the '>>' follows the 'w', buffer contents
will be appended to filename.
EXAMPLES:
:'a,$w>> george<cr>
:1,.w albert<cr>
The first example will append to file "george"
the text delimited by line 'a and the
last line (inclusive). The second example
will write out the first line through the
current line to file "albert".
vi +[command] file[s] (Executed from MS-DOS prompt)
:e +[command] file[s] You can invoke Oak Hill Vi with an
initial command that will be executed
as soon as your file has been read.
EXAMPLES:
vi + file Edit "file" starting at last
line.
vi +3 Edit "file" starting at line 3
vi +/string file
Edit "file" starting at the
first line were "string"
appears
vi +"command" file
Edit "file" and execute
"command" immediately
after the file has
been read
Note that if "string" or "command" contains
spaces, they should be enclosed in
quotation marks or Oak Hill Vi will
confuse the arguments with file names.
EXAMPLE:
vi "+/Now is the time" file
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 29
is the correct way to start
editing "file" at the line that
contains the string "Now is
the time"
All of the above features also work if you
use the :e command from inside the editor.
For example,
:e +3j file<cr>
will edit "file" starting at line 3. In
the current version of Oak Hill Vi,
however, embedded blanks in the command
string are not allowed and will cause parts
of the command string to be interpreted as
file names.
:r <n1> <n2> filename<cr>
(NON-UNIX) Read lines n1 through n2 from filename
into buffer below current cursor position.
Requires that (1 <= n1 <= n2 <= 32000). If
n2 is larger than the last line, read will
proceed to end of file. "$" may be used in
place of n2 to represent 32000. This
command, combined with write (:w) commands,
is useful for splitting large files into
smaller pieces that Oak Hill Vi can
handle. (See also the discussion of the
"slice" utility program below.)
EXAMPLE:
:r 100 200 george<cr>
will read lines 100 through 200 of file george
into the buffer.
You may use wildcard characters in "filename",
but only the first matching file will be read.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 30
2.9 OPTION-SETTING AND OTHER COMMANDS
-----------------------------------------------------------------------
*** OPTION SETTING COMMANDS ***
:set all<cr> Display current setting of all settable options.
:set <cr> Also show the full directory path in which the
EXRC file (if any) was found.
:set ai<cr> Turn on autoindent
While inserting text, automatically copy the
indentation (white space characters) used on
the previous line. You can backspace over
the indentation characters with <ctl-D>.
:set noai<cr> Turn off autoindent (default)
:set aw<cr> Turn on autowrite (default)
Before escaping to DOS (with :! command) write
the buffer out to disk if it has been altered
since the last save.
:set noaw<cr> Turn off autowrite
:set beep<cr> Have computer speaker sound a "beep" on user errors
(default).
:set nobeep<cr> Keep computer speaker silent on errors -- instead
flash a "BEEP!" message briefly at the
bottom of the screen. This option is
useful if (for example) you are using a
laptop machine in a conference room and
wish to avoid annoying those around you
with a beeping computer.
:set ctr=n<cr> (NON-UNIX) Set column about which lines will be
centered when using the ":center" command.
Default n=40.
:set cursor=underscore<cr>
:set cursor=box<cr>
:set cursor=inbox<cr>
(NON-UNIX) Set cursor type. On some machines,
particularly those with LCD displays,
a simple underscore for the cursor is
hard to see, so Oak Hill Vi uses a
"flashing box" cursor as the default.
On a CRT, the traditional flashing
underscore is preferred by some users.
The "inbox" option uses an underscore
in command mode and a box in input
mode. This set command allows the
user to set to cursor type to match
his/her preference. The default is
the "inbox" option.
:set esc2=x<cr> (NON-UNIX) On some keyboards the escape key is clumsy
to reach. This command allows the
character 'x' to serve the same purpose,
where 'x' can be any character. Reasonable
choices are <ctl-O> or <ctl-J>. Caution:
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 31
If you choose a character that is already
serving another purpose, for example 'a',
you will disable that function! Note that
<ctl-[> is equivalent to hitting an escape
key.
:set colors=[bright] foreground [on] background<cr>
(NON-UNIX) Set foreground and background colors.
The color names must be chosen as shown
below.
Available Colors
------------------
black
red
green
yellow
blue
magenta
cyan
white
To get bold foreground characters, include the
word "bright" before the foreground color name.
Only the first 3 letters of each color name
need or key word need be used, and the "on"
key word is optional.
Valid EXAMPLES:
:set colors = white on blue<cr>
:set colors = bright yellow on red<cr>
:set col bri whi red<cr>
If colors are not explicitly set, Oak Hill
Vi will default to the colors being used
when the program was called. If the colors
are explicitly set, Oak Hill Vi (TM) will
return to the starting colors when the
program exits.
:set ic<cr> Ignore case (upper/lower) when doing string searches
:set noic<cr> Do not ignore case when doing string searches (default)
:set lines=n<cr>
(NON-UNIX, LARGE-FILE MODEL ONLY) Resets number of
lines (n) screen can display. This number
is not arbitrary; you should choose from
the table below:
CGA monitors: 25 lines only
EGA monitors: 25 or 43 lines only
VGA monitors: 25 or 50 lines only
To allow for some trial-and-error testing
on the many monitor types available, Oak
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 32
Hill Vi will allow you to specify 25, 43,
or 50 lines on any monitor. However, your
display may not function properly if you
choose a value other than those indicated
above. The 25-line mode should work
properly on all monitor types.
(Note that the Small-File Model supports only
the 25-line mode.)
:set magic Recognize meta characters when doing pattern searches.
:set nomagic Do not recognize meta characters when doing pattern
searches. Interpret each character literally.
See Section 2.4.
:set nu<cr> Turn on line number option
:set nonu<cr> Turn off line number option (default)
:set press<cr> Require a carriage-return after program greeting
screen (default)
:set nopress<cr>Do not require carriage-return after greeting screen
:set sections=<string><cr>
Change the section delimiter string ("SHNHH HU") to
"string". Note that to have a space in the string
it must be quoted with a backslash. For example,
":set sec=SHH\ bpHU<cr>" will set the delimiter
string to "SHH bpHU", and a start-of-section will
be detected on lines that begin with .SH .H .bp
or .HU.
:set showmode<cr>
Print "Input Mode" identification tag in lower right
corner of screen after "i", "a", "o", "O",
"cc", "r", "s", or other commands that
expect input text from the keyboard.
(default)
:set noshowmode<cr>
Do not print the "Input Mode" identification tag.
:set ts=n<cr> Set tab stops every n spaces --
n can be any number from 1 to 40.
:set wm=n<cr> Set wrap margin to n spaces -- automatically generates
carriage returns when n or fewer spaces
remain on the line. ":set wm=0" (the
default) will disable the function. This
command is useful for high-speed typing --
carriage-returns are supplied by the
program.
:set ws Wrap around end of file on searches (default)
:set nows Do not wrap around end of file on searches
:set rmar=n<cr> (NON-UNIX) Set right margin for text filling (see below)
Default value is rmar=70.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 33
*** OTHER COMMANDS ***
:help<cr> (NON-UNIX) Get on-line help. In order for this
command to work, the file VIHELP.TXT,
supplied with Oak Hill Vi, must have been
copied into the working directory, the
directory where vi.exe is stored (typically
"\BIN"), or elsewhere in the DOS "PATH".
If Oak Hill Vi can find the file, it will
display its contents with a simple file
viewer that allows you to page and scroll
through syntax examples for the most common
vi commands. You may also skip directly to
a topic of interest by using the section
code letter given in the table that appears
when the :help command is first entered.
:heap<cr> (NON-UNIX) Print the number of free bytes still
available in the memory heap. The
indicated space is not completely
available for text because each line
of text requires at least 10 bytes of
overhead.
:clear<cr> (NON-UNIX) Clear the yank, last-command, and
named buffers, and show the number of free
bytes still available in the memory heap.
:[range]fill <cr>
(NON-UNIX) In the range specified, fill text with
left margin copied from current line and
right margin 'rmar' spaces. See detailed
"FILL" description below.
:[range]rfill <cr>
(NON-UNIX) Same as :fill except that new sentences will
begin on a new line. This is useful for making
already-filled text easier to edit.
-> :fillp<cr> (NON-UNIX) Fill paragraph. Like :fill except that
the entire paragraph in which the cursor
sits is filled (no need to mark any text).
A paragraph is a section of text delimited
by blank lines, the start or end of a file,
lines that begin with a space or any of the
characters in the string ".-_=*", or a
<ctl-X>.
:rfillp<cr> (NON-UNIX) Reverse fill paragraph. Like "fillp" except
that new sentences will begin on a new line.
:[range]upcase (NON-UNIX) Convert to upper case the range of
lines indicated.
:[range]lowcase (NON-UNIX) Convert to lower case the range of
lines indicated.
:[range]center (NON-UNIX) Center on the page the range of
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 34
lines indicated. Control characters, tabs,
and leading or trailing spaces will be
ignored when this command computes where to
place the line. Lines greater than 80
characters will not be altered. Lines will
be centered about the current value of
"ctr". By default ctr=40. It may be
altered with the ":set ctr=n" command.
:n<cr> [file(s)] Edit next file name in the queue. If "file(s)"
are present, establish a new queue. See
Section 1.3
:args<cr> List file names in queue.
:rew<cr> Rewind the names in the queue and start over
with the first name in the queue.
:tag label<cr> If the current directory contains a file named
:tag! label<cr> "tags" which contains lines in the format
label filename /string
then the program will clear the current
file buffer, read file "filename" into the
editor, and position the cursor at the
beginning of the line that contains
"string". This is useful (for example) if
you come across a a subroutine named
"label" in a C program and you want to jump
quickly to the file where the subroutine is
defined. After looking it over you can
jump right back to your original file with
the command <ctl>^ (control-shift-6 on
most keyboards).
You may create the file "tags" manually
or you may use a "ctags" program to create
it automatically. As of the date of this
writing, one such program is available on
CompuServe, IBMAPP/Text Editors library,
under the name CTAGS3.ARC.
Instead of the '/' in the tag-file entries
you may also use '?'. The cursor will then
move to the last occurrence of "string"
rather than the first.
When you enter the ":tag" command, the
current buffer will first be saved if the
"aw" option is set and the file has been
modified since the last save. If "noaw"
is set and the file has been modified,
":tag" will be rejected -- you may override
this protection feature by using ":tag!".
<ctl>] This is a fast way to execute a ":tag label"
command. By positioning the cursor at the
start of a word and hitting <ctl>], the
program will execute ":tag label" with
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 35
that word taken to be "label".
v Print greeting message and Oak Hill Vi version
number on screen.
-> <ctl-L> Redraw the screen -- useful if display becomes
corrupted.
-> mx Mark the current line and cursor position with
an identifying character from [a-z] (see
'x command, up to 10 lines may be marked;
erasure and re-use of the 10 is automatic)
-> <ctl-G> Same as ":f<cr>" as described below
-> :f<cr> Print on the status line the name of the current file,
the line number, the total number of lines,
total characters to end of current line,
and total number of characters in file. If
the file has been modified and has not been
written out to disk, the indicator
"[modified]" will appear next to file name.
-> :!<cr> Escape to MS-DOS.
-> :shell<cr> Either of these commands escapes to MS-DOS and
allows you to enter DOS commands without
exiting the Oak Hill Vi editor. A copy
of the MS-DOS program COMMAND.COM must be
accessible via the current MS-DOS PATH on
the current disk. Enough unused memory
must be available to run COMMAND.COM and
the DOS command you choose. Otherwise an
error message will be generated.
:!cmd<cr> Same as above except that the DOS command "cmd"
will be executed immediately.
<ctl-C> Abort program. This is an MS-DOS command to
be used in case the program seems "hung".
When the program is operating normally,
this command will not generate an abort.
"x<n><yank> Named buffer yank/delete: on next yank or delete
"x<n><delete> command, save yanked or deleted text in
buffer x where x is a character from [a-z]
as well as saving it in the usual default
buffer.
EXAMPLES: "a6yy
"x4dw
The first example will yank six lines
and store them in buffer 'a'.
The second example will delete four words
and store them in buffer 'x'.
"xp Named buffer put: do a put (p or P) command using
"xP the contents of named buffer x rather than the
contents of the default buffer.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 36
EXAMPLE: "ap will put the contents of marked
buffer 'a' after the current line or
cursor position.
!adr cmd<cr> This command will delete a group of lines from the
current line to the line at address adr, pass
those lines through an external filter 'cmd',
and load the results into the location
originally occupied by the unfilterd lines.
Note: This command is not preceded by a colon.
Examples:
!3jsort<cr>
!'asort<cr>
!21Gsort<cr>
!Gsort<cr>
!!dir<r>
The first example will pass the current line and
the next three lines through the DOS 'sort' filter
and replace the original lines with a sorted
version.
The second example will do the same for the current
line through the line marked 'a'.
The third example will do the same for the current
line through the 21st line.
The fourth example will do the same for the current
line through the last line.
The fifth example will replace the current line
with output of the DOS 'dir' command (useful for
looking at the contents of directories without
leaving the editor).
This command can be undone with the 'u' (undo)
command.
Note: This command must write temporary "scratch"
files to your current default directory. There
must be enough space for these files or the command
will fail.
:map [_label] lhs rhs<cr>
:unmap lhs<cr>
:map<cr> While in the command mode, make left-hand string
"lhs" stand for the commands in the right-hand
string "rhs". "rhs" may contain spaces, but
"label" and "lhs" must not contain any spaces. If
lhs and rhs are separated by more than one space,
the extra spaces will be included at the front end
of rhs. Use <ctl-V> to preface any special
characters like carriage return or backspace. Any
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 37
number of mappings may be stored. Rhs may contain
up to 127 characters. If you attempt to store two
mappings with the same lhs, the later one will
replace the earlier one. ":unmap" will remove a
mapping.
":map" with no arguments will print a list of
active mappings. If the optional "label"
string is present, it will be listed along with
"lhs" and "rhs" when you enter the ":map" with
no arguments. The label may serve as a reminder
of what the "lhs"-to-"rhs" mapping is for. It
may also be a reminder of which special key
may be pressed (e.g., "F1") to generate the
string lhs. To be recognized as a label,
"label" must be preceded by the underscore
character '_'.
The cursor movement keys (up, down, home, end,
etc.) are premapped and labeled when you load
Oak Hill Vi. You may change these mappings if
you wish. See the Section in Chapter 2 on
"edit keys" for your computer.
We recommend that you choose a character that you
seldom press (for example ';') to be the first
character of all your mappings. This will avoid
surprises when you're typing your text. If you
choose to use ';', you may wish to map ";;" into
";" so that you do not loose the function provided
by the ";" command.
EXAMPLES:
:map ;g /George^V<cr>cwBill^V<esc><cr>
:map ^_mark ;> :1,$s/^/>/<cr>
The first example will make the command string ";g"
search for the next occurrence of the pattern
"George" and convert it to "Bill". The second
example will make the command string ";>" put a '>'
character in front of every line. The label
"mark" will appear with this mapping when you
enter the ":map" command.
Note: You may also wish to map your "function keys"
or "alt-char" keys into special commands. On the
US IBM PC standard, these keys produce a
two-character sequence -- a "nul" character (ASCII
value 0) followed by some other character. Because
the nul character is used internally by Oak Hill
Vi, any nul character arriving from the keyboard is
immediately mapped into the '#' character. This
explains why, for example, pressing the 'F1' key in
input mode will produce "#;" and pressing alt-X
will produce "#-".
Note: This comand differs from the one below
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 38
(:map!) which operates in the input mode.
:map! [_label] lhs rhs<cr>
:unmap! lhs<cr>
:map!<cr> While in the input mode, make left-hand string
"lhs" stand for the commands in the right-hand
string "rhs". "rhs" may contain spaces, but
"label" and "lhs" must not contain any spaces. If
"lhs" and "rhs" are separated by more than one
space, the extra spaces will be included at the
front end of "rhs". Any number of mappings may be
stored. Rhs may contain up to 127 characters. If
you attempt to store two mappings with the same
lhs, the later one will replace the earlier one.
":unmap!" will remove a mapping. ":map!" with no
arguments will print a list of active mappings.
You may label your mappings as in the ":map"
command above. See also the discussion above
regarding function keys and alt-char keys.
EXAMPLE:
:map! ;rd requirements documents<cr>
With this mapping active, if you type ";rd" while
entering text in the input mode, the ";rd" will be
immediately replaced by the string "requirements
documents".
Note that this command differs from the one above
(:map) which operates in the command mode. Note
also that this command is very similar to the
":abbr" command -- the difference is that in the
":abbr" command, the macro must stand alone,
separated from adjoining text by spaces, tabs, or
punctuation. In the ":map!" command the macro
string is replaced no matter where it appears.
@x Where 'x' is any character from 'a' through 'z'.
@@ This will cause the contents of the 'x' save buffer
to be interpreted as a set of commands entered from
the keyboard. This is similar in function to the
":map" command except that it allows you to edit
the command sequence as if it were a line of text.
For complex sequences this is more convenient than
trial-and-error retyping of ":map" sequences. Once
the command sequence works as you wish it to, it
can always be transferred to a ":map" command or
placed in an EXRC file. "@@" is simply a fast way
of entering the most-recently-entered "@x" command.
If the save buffer contains more than one line,
the commands on the lines will be concatenated,
up to a limit of 125 characters.
EXAMPLE:
Suppose a line of text in your file consists of:
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 39
:s/Sam/Bill<cr>
If you place a cursor on that line and type the
command
"ayy
the line will be saved (as usual) in named buffer
'a'. Thereafter if you type
@a
the contents of the register will be executed
as if it were a command string entered from the
keyboard, and the first occurrence of "Sam" will
be replaced by "Bill".
2.10 IBM EDIT KEYS AND CUSTOMIZED FUNCTION-KEY MAPPING
----------------------------------------------------------------------
One of the strengths of the vi editor is that all commands and
input are entered directly from the QWERTY keyboard. For
touch-typists, the vi editor simply becomes an extension of their
touch-typing skills. In particular, touch-typists do not have to
take their eyes off the screen to search for the Edit Keys
(Up-Arrow, Down-Arrow, Insert, Home, etc.)
Nonetheless, many users still like to use the Edit Keys. These
have been "pre-mapped" as shown in the table below.
IBM EDIT AND DISPLAY CONTROL KEYS
-----------------------------------------------------------------------
Up-Arrow Cursor up 1 or 4 lines (same as 'k 4k')
Down-Arrow Cursor down 1 or 4 lines (same as 'j 4j')
Left-Arrow Cursor left 1 or 4 characters (same as 'h 4h')
Right-Arrow Cursor right 1 or 4 characters (same as 'l 4l')
Pg Dn Jump ahead one screenfull (same as <ctl-F>)
Pg Up Jump back one screenfull (same as <ctl-B>)
Home Jump to first line (same as '1G')
End Jump to last line (same as 'G')
Del Delete 1 character (same as 'x 4x')
Insert Insert text (same as 'i')
-----------------------------------------------------------------------
If you enter the command ":map<cr>" when you first load
Oak Hill Vi, you will see entries like:
<Up> #H k
<Down> #M j
<Home> #K 1G
This shows how the Edit Keys are pre-mapped. (See also the section
above on the ":map" command.) The first line shows that the
sequence "#H" is mapped into the command 'k', which causes the
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 40
cursor to move up one line. The entry "<Up>" is simply a reminder
label of what key generates the sequence "#H".
The pre-mapped Edit keys are "soft" and may be remapped to do
other commands by simply remapping them from inside the editor
or in an EXRC file.
If you have complex command sequences that you find yourself
typing repeatedly, you may use the ":map" command as described
above, or you may map the function keys to perform these
commands with a single keystroke.
For example, suppose you like to save your editing work in both the
hard disk directory you're working on AND a floppy disk in drive
B:. You could create your own command ";s" to do this by entering
:map ;s :w^V^M:w! b:^V^M<cr>
Thereafter, every time you enter ";s" in the command mode,
your work would be saved on both the hard disk and the floppy.
(Note that control-V is used to quote the carriage return
control-M and make it part of the command sequence.)
Alternatively you could type
:map ^_F3.doublesave <F3> :w^V^M:w! b:^V^M<cr>
where "<F3>" means you press the F3 function key. The F3 key
will produce the sequence <NULL>D, appearing on your screen as
"#D" and will be mapped as shown. Thereafter if you simply
press the F3 key, your work will be saved on both the floppy
and hard disk. And if you enter ":map<cr>" one of the entries
you will see is
F3.doublesave #D :w^M:w! b:^M
reflecting your customized mapping and reminding you of what it
does. Remember that these mappings may be specified in the EXRC
file so that they will be available every time you load Oak Hill
Vi.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 41
3.0 LINE RANGE SPECIFICATION
=======================================================================
Line ranges are specified in the form
[spec1,[spec2]]
If both spec1 and spec2 are missing, the implied range is simply
the current line.
If spec2 is missing, the implied range is spec1.
Spec2 must be greater than or equal to spec1 or an error message
will be generated.
The spec values may be an integer line number, "." to represent the
current line, "$" to represent the last line, "'a" to represent the
line named "a" (see mx command, Section 2.7), "%" as a shorthand to
indicate all lines, or a pattern search "/string/". Any of these
spec values except % may be followed by a "+n" or "-n" to indicate
a count of lines above or below the spec. Alternatively, "+++" is
equivalent to "+3" for example.
Spec EXAMPLES:
4,30 Line numbers 4 through 30.
.,$ Current line through last line.
'a,'b Lines named (see mx command, Section 2.7) 'a through 'b.
'a,. Line 'a through the current line.
% Lines 1 through last line (synonymous with 1,$).
(nothing) Current line only
/Dorothy/ Next line on which the string "Dorothy" appears
.,.+4 Current line through next four lines
.,.++ Current line through next two lines
--- Third line above current line ("." is default)
/Sam/++ Second line below line where "Sam" occurs
$-1 One line above last line
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 42
4.0 TEXT FILL AND CENTERING FEATURES
=======================================================================
With the ":fill" and ":center" commands, you can do elementary
word processing within Oak Hill Vi.
4.1 TEXT FILL FEATURE
--------------------------------------------------------------------
The "fill" feature allows you to clean up "ragged" lines of varying
length will a single command. This function is sometimes called
"formatting." The range of text to be filled may be specified with
a line range specification, or you can use the ":fillp" command to
fill text as you edit.
For example, suppose you have entered and edited text in the
following "ragged" form --
Man is a singular creature. He has a set of gifts
which make him unique among the animals: so that
unlike them, he
is not a figure in the landscape -- he is a shaper
of the landscape.
In body
and in mind he is the explorer of nature, the
ubiquitous animal, who
did not
find but has made his home in every continent.
By issuing a single command, Oak Hill Vi will replace this
paragraph with the following neatly filled text --
Man is a singular creature. He has a set of gifts
which make him unique among the animals: so that unlike
them, he is not a figure in the landscape -- he is a
shaper of the landscape. In body and in mind he is the
explorer of nature, the ubiquitous animal, who did not
find but has made his home in every continent.
EXAMPLES:
:fillp<cr> will fill the paragraph where the cursor is located
:fill<cr> will fill the current line only
:'a,.fill<cr> will fill the line marked "a" to the current line
:%fill<cr> will fill the entire file
If the last (non-white-space) character on a line is an
end-of-sentence character ('.', '?', or '!'), that line will
be followed by two spaces in the filled text.
When filling text:
Blank lines are not affected, so paragraphing will be
preserved.
Lines whose first non-white space character is a '.'(period)
will not be affected, so any UNIX nroff/troff command lines
(like .P, .sp etc.) will not be altered.
Lines whose first non-white space character is a ^M or ^L will
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 43
not be altered.
Lines that begin with a <ctl-X> will not be altered. This
feature lets you explicitly "protect" lines from the fill
function with a character that can be removed later by a
global substitution.
Any control characters present in the text are "not counted"
in performing the fill operation. For example the strings
^Uhello^T
and
hello
are both counted as occupying five columns. This lets you
imbed printer control characters in the text without affecting
the "fill" of the final text. These control characters can be
expanded to longer control sequences (if required) by a global
substitution or with the "page" program described below.
The text fill operation is reversible with the "u" (undo) command.
Note: It is good practice to fill modest-sized blocks of text at a
time. Because the undo function must "remember" the text block the
way it was before filling, the program must find enough heap memory
to hold the "old" version. The program will not abort if you
attempt to fill too much text at once; it will simply generate a
warning message asking you if you wish to proceed even though the
fill will not be reversible. Of course if you wish to fill a large
file all at once you can always put a safety copy of the file on
disk with the ":w filename<cr>" command.
The fill operation will observe a right margin set by rmar. The
left margin will be "copied" from the current line. The left
margin may be any number of consecutive spaces or tab characters.
Example: if rmar=70 and the current line has two tab characters at
the front of the line, the text will be filled with a right margin
at the 70th column, and the left margin will be 16 columns (two tab
characters) for every line in the fill range. The value for rmar
may be set to any number from 20 to 160, but the fill operation
will be rejected if rmar is less than 20 characters from the left
margin.
Note: for a given selection of margin settings the results of fill
operations will be the same whether the line number option, ":set
nu<cr>" has been activated or not. If the option is "on", the text
will appear on the screen to be right-shifted by 8 columns to leave
room for the line number, but the margins and line lengths in the
actual text will be the same as if the line number option were
turned off.
Text is generally easier to edit if each new sentence begins on a
new line. Once text has been filled, it becomes harder to edit
because a new sentence may begin anywhere. To make it easier, use
the "rfill" command (mnemonic - "reverse fill" or "roff fill").
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 44
This command works like "fill" except that (1) every new sentence
(defined below) is forced to begin on a new line, and (2) the left
margin is forced to zero. "rfillp" is like "rfill" except that
only a single paragraph (the one in which the cursor is located)
will be affected.
EXAMPLES:
:'a,'brfill<cr> will "reverse fill" text from lines "a" to "b"
:rfillp<cr> will "reverse fill" the current paragraph
Oak Hill Vi assumes a new sentence has begun if it finds an
end-of-sentence character followed by two spaces, or an
end-of-sentence character that is the last non-white-space
character on the line.
If you use the "fillp" and "rfillp" operations frequently, don't
forget the convenience of the "map" command to simplify your
typing. We recommend commands like
:map _F9 #C :fillp^M<cr>
:map _F10 #D :rfillp^M<cr>
for your EXRC file (see the "SETUP FILE" section). Then when you
wish to fill the text in a paragraph, all you have to do is hit
Function Key F9 or F10.
4.2 TEXT CENTERING FEATURE
--------------------------------------------------------------------
The "center" command allows you to center one or more lines of
text. As in the "fill" command, control characters are ignored in
calculating where to start the line. This allows you to place
printer control characters in-line with the text without affecting
centering.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 45
5.0 SETUP FILE "EXRC" AND THE "EXINIT" ENVIRONMENT VARIABLE
=======================================================================
If you have a standard set of options or commands you would like
exercised automatically every time the program loads, they may be
entered into a special file for that purpose called EXRC.
Every time Oak Hill Vi is loaded, it looks for EXRC first in
the current directory. If it is not found there, the MS-DOS PATH
environment variable is fetched, and each directory in the path is
searched in turn until the file is found. If the file is not
found, all default variables are used. Therefore, a good place to
store your "basic" EXRC file is wherever you have stored the Oak
Hill Vi executable file.
If you'd like to have editing features that are customized for
particular text files, just store a customized EXRC in the same
directory as the text file, and make that directory your default
directory as you edit.
If you want to check the directory in which Oak Hill Vi found
your EXRC file, use the ":set<cr>" command. The first line of the
output from this command will show where the EXRC file, if any, was
found.
An example of a setup file that (a) automatically invokes line
numbering, (b) sets a margin wrap at 10 spaces, (c) maps the
command ">" into a fill-paragraph command, (d) maps "<" into
fill-paragraph with-each-sentence-on-a-new-line command, and (e)
sets the right margin for text fills at column 75, is given by the
five-line setup file --
:set nu
:set wm=10
:map > :fillp^M
:map < :rfillp^M
:set rmar=75
Each command must appear on a separate line. Only :set, :map,
:map!, and :abbrev commands may be used. Others will be ignored.
Note that if a carriage return is required as part of the command
itself (as in the "map" commands), it must appear explicitly -- the
carriage return at the end of each line in EXRC doesn't count! (If
you are using Oak Hill Vi to create EXRC, just "quote" the
carriage return by preceding it with a <ctl-V>.) It will appear as
"^M".
Unix allows the user to set an environment variable called EXINIT
that can contain a set of initialization commands. DOS has a "set"
command that in principal could allow this, but it is clumsy to use
for vi because some of the characters that are needed ('|' and
'=') have special meaning to DOS, and the DOS default "environment
space" is limited. Nonetheless Oak Hill Vi will recognize the
DOS environment variable EXINIT and will execute a single colon
command represented by the EXINIT string. For example, if
you include the line
set EXINIT=:set aw ai rmar 40 color white on blue
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 46
in your AUTOEXEC.BAT file, these options will be set when Oak
Hill Vi loads. Note that only one command may be issued and
the '=' characters used in setting options must not appear.
If you set an option in both an EXINIT variable and in an EXRC
file, the EXRC file instructions will override those in the EXINIT
file. In either an EXRC file or EXINIT string, unrecognized
options are ignored.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 47
6.0 MEMORY AND FILE SIZE CONSIDERATIONS
=======================================================================
The current version of Oak Hill Vi does all editing on buffers
stored in a core memory "heap". Except when reading and writing
files, the program does not access disk storage. This has the
advantage of making the program very fast, as well as reducing the
power consumption and noise level in battery-powered lap-top
portable computers with disk drives. It has the disadvantage of
limiting the maximum-sized file you can edit.
Maximum file sizes for the two program models are:
Approximate Available
Max File Size Machine Memory
-----------------------------------------------------
Standard Model 250,000 characters 640K bytes
Compact Model 35,000 characters 140K bytes
Oak Hill Vi makes its own internal checks on the memory heap
as you use it. You will receive warning messages as you approach
the end of the available heap. When such a message appears and you
are editing a large file, it is best to save your work, exit the
program, and "slice" the file into smaller sub-files using the
special read routine described below or the separate "SLICE"
utility program described in the next section.
Heap warning messages may also appear after very long editing
sessions on files that are below the maximum sizes shown above.
This is because the overhead of memory management is not entirely
recoverable after every editing change, and eventually the heap
becomes exhausted. In this case, the best thing to do is simply to
write out the buffer and quit ("ZZ" or ":wq"), and restart the
program.
If warning messages are ignored and the heap becomes corrupted, the
program will terminate abruptly, and all editing done since the
last save will be lost. The abort is necessary since any attempt
to write out a corrupted heap would destroy an already-saved file.
If you wish, you can monitor the status of the memory heap with the
command ":heap<cr>". This will show the size of the heap that Oak
Hill Vi still has available. Chunks of memory under 500 bytes
are not counted. The ":clear<cr>" works like ":heap<cr>" except
that it will first free any memory held by the yank/delete buffers
and all the named buffers.
Another way to monitor remaining available memory is to use the
shell escape command, ":!<cr>", and run the DOS chkdsk command.
If you use core-resident programs (like Borland's "Sidekick"), it
is best to have these programs loaded before you run Oak Hill Vi.
Do not start core-resident programs from the Standard Model Oak
Hill Vi shell escape. If you do, you will "box in" Oak Hill Vi and
the heap will exhaust almost immediately!
"Boxing in" is not a problem with the Compact Model because that
model requests its full allotment of 64K as soon as the program
loads. If you wish to use Oak Hill Vi as one of several
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 48
core-resident programs you should use the Compact Model. Note
that other than the shell escape feature, no explicit support is
provided to do make Oak Hill Vi "core-resident".
If you wish to edit a file that is larger than (or even close to)
the maximum sizes shown, we recommend that you first break the file
into "chapters" or major sections of about half the maximum sizes
shown, using the "slice" utility and/or the ":r n1 n2 filename"
command described below.
Example: Suppose the ASCII file "george" contains 400,000
characters. Assuming an average of 50 characters per line, george
contains about 8000 lines. Therefore to break george into four
files, the following sequence of Oak Hill Vi commands may be
used.
vi temp
:r 1 2000 george
:w chap1
dG
:r 2001 4000 george
:w chap2
dG
:r 4001 6000 george
:w chap3
dG
:r 6001 8000 george
:w chap4
:q!
These commands will break george into four files called chap1,
chap2, chap3, and chap4. These may be edited separately and later
recombined with the MS-DOS command --
copy chap1+chap2+chap3+chap4 george or copy chap* george
See the discussion of the "slice" program below for another
approach to examining and breaking apart large files.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 49
7.0 "SLICE" UTILITY PROGRAM
========================================================================
The "slice" utility program may be used to (A) count the lines,
words, and characters in a file (B) list a designated range of
lines (C) cut a file into smaller, easier-to-edit sub-files (D)
find good "cutpoints" for a large file by searching for specified
character strings in the file.
-----------------------------------------------------------------
(A) Counting lines, words, and characters
Usage: slice filename1 [filename2 ...]
This usage will produce a one-line message telling how many total
lines, words (character strings separated by white space), and
characters a given file has.
EXAMPLE: slice george sam bill
This would produce three messages like the following --
"george" has 122 lines, 916 words, 4562 characters
"sam" has 14 lines, 102 words, 706 characters
"bill" has 2034 lines, 11301 words, 58931 characters
-----------------------------------------------------------------
(B),(C) Listing and cutting a designated range of lines.
Usage: slice n1 [n2] [^]filename1 [> filename2]
To help you decide where to break a file, you can list selected
lines of a file with this command. If n1 and n2 are specified,
lines n1 through n2 will be sent to the screen. If only n1 is
specified, all lines from n1 to the end of the file will will be
sent to the screen. If the filename is preceded by a carot (^), a
line number will precede the listing of each line.
If the output is redirected with the ">" character, the designated
file segment will be written into filename2. This is how the file
can be split.
EXAMPLE:
Suppose you use
slice 200 400 ^george
to determine that a good breakpoint in george comes at line 263,
where a major text heading begins.
You may then use
slice 1 262 george > george1
slice 263 george > george2
to create the two smaller sub-files george1 and george2.
-----------------------------------------------------------------
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 50
(D) Finding cutpoints with a string search
Usage: slice // filename1 [filename2 ...]
slice %% filename1 [filename2 ...]
These commands will accept the list of filenames and then ask you
for a search string on a separate input line. The program will
then supply a line number and list every line where it finds the
specified string. The first ("//") version requires an exact match
to the search string. The second ("%%") version allows the use of
meta characters (see the string search discussion in the "TEXT
SEARCH" section above).
It can be tedious to list hundreds of lines looking for a good
cutpoint. If you already know some of the text on the line where
you would like to make a cut (for example the title of a major
heading), you can use these commands to locate the cutpoint more
quickly.
EXAMPLE: slice // george
will produce the query
Enter search string:
Suppose you supply a string from heading that you know starts a
major section of your file.
MARKET ANALYSIS
The program would then scan the entire file george and produce an
output like this --
george:
388 PRELIMINARY MARKET ANALYSIS RESULTS
You would then know to cut the file at line 388.
Entering the slice command with no arguments will print a summary of
the command syntax.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 51
8.0 "PAGE" TEXT PROCESSING PROGRAM
=======================================================================
The "page" program is a simple utility to add top-of-page and
bottom-of-page processing (including page numbers, headers, and
footers) needed before sending a file to a printer. "Page" will
also translate user-settable characters into special strings to
control printer underlining, bold, or other special functions.
With the "fill" function of Oak Hill Vi and the "page"
program, Oak Hill Vi makes a fast, simple, word processor as well
as a text editor.
Usage:
page [-Tn] [-Bn] [-Ln] [-Nn] [-Sn] [-Cn] filename1 [> temp]
The "n" values are the following integer constants.
-Tn number of blank lines at the top of the page (default=5).
-Bn number of blank lines at the bottom of the page (default=3).
-Ln length of page in lines (default=66).
-Nn sets page on which first header appears (default=2).
-Sn sets page number value in first-appearing header (default=2).
-Cn sets center column for headers and footers (default=30).
The processed files will be printed to the screen with page
spacing, page headers, and numbers inserted. (No page numbers will
be inserted if there are less than 3 blank lines at the top of the
page.) If the "> temp" is appended, the output will be placed in
file "temp" where it can be sent to a hard copy printer.
EXAMPLE:
page -L88 george > ggg
will put a ready-to-print version of file "george" into the file
"ggg". The file "ggg" will be set up for an 88-lines-to-the-page
printing.
8.1 PAGE HEADERS AND FOOTERS
--------------------------------------------------------------------
Page "headers" and "footers" can be added to the printed output by
imbedding the strings in the text with the syntax:
.HEADER=headerstring
.FOOTER=footerstring
Everything past the equal sign "=" will appear in a header or
footer string.
EXAMPLE:
If the file "george" has the lines (with the '.' in column 1)
.HEADER=This Is A Header
.FOOTER=This Is A Footer
page -C25 -S15 george > ggg
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 52
will put a ready-to-print version of file "george" into file "ggg"
with headers and footers centered about column 25. Page numbering
will begin with a "This is a Header -- Page 15" at the top of the
first page of output.
8.2 CHARACTER TRANSLATION
-----------------------------------------------------------------------
As it processes a file, "page" will optionally translate
user-designated characters into user-designated character strings.
By imbedding control characters in the text (which are not
"counted" when filling text -- see Section 4), print control such
as bold or underlining can be imbedded with the test.
The translation table is contained in a separate file called
"TRANS.PVI". Page will search for this file first in the current
directory, then in the directory "\BIN", then "\LIB", and finally
the root directory "\". If it cannot find the file, no
translations will take place.
The following is an example of a legitimate "TRANS.PVI" file
format:
; File Start
; Hewlett Packard Thinkjet Translation Codes
^A ^O ; Bold Off
^B ^N ; Bold On
^T ^[&d@ ; Underline Off
^U ^[&dD ; Underline On
^R ^[&k0S ; Normal Print Pitch
^S ^[&k1S ; Expanded Print Pitch
^Y ^[&k2S ; Compressed Print Pitch
^Q ^[&k3S ; Expanded-Compressed Print Pitch
; File End
In this file (as in the Oak Hill Vi screen display), control
characters are indicated by a leading '^' character.
The indicated TRANS.PVI file (supplied on the program disk) will
translate every ^U character into the sequence ^[&dD and every ^B
character into the sequence ^N. The following are syntax rules for
TRANS.PVI:
1. Blank lines are ignored.
2. Any text to the right of a ';' character is ignored.
3. Any single character except ';' and '^Z' may be translated.
EXAMPLE:
During editing you enter:
^UFourscore and seven years ago^T, our forefathers brought
When run through "PAGE" and the TRANS.PVI table above, this line
becomes:
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 53
^[&dBFourscore and seven years ago^[&d@, our forefathers brought
And when printed on the Thinkjet the phrase "Fourscore and seven
years ago" will be printed in bold.
8.3 OTHER
-----------------------------------------------------------------------
A <ctl-L> (form-feed) character at the beginning of any line will
cause a skip to the next page. Any remaining characters on the
line are ignored.
Entering the page command with no arguments will print a summary of
the command syntax.
9.0 OAK HILL Vi (TM) and UNIX (TM) Vi
=======================================================================
In building Oak Hill Vi we have tried to include all of UNIX
Vi's most commonly used features. We apologize if we've left out
one of your favorites! Generally, if a feature that you like is
missing, you'll find that there is another reasonable (though
perhaps less familiar) way to do the same thing.
We are continuing to improve Oak Hill Vi, adding features as
requested while attempting keeping the program compact, fast, and
all "core-based". If you have special interest in a feature you
would like to see added to Oak Hill Vi, please write us to tell us
about it. If you are among the first three people to request a new
feature that is subsequently added, you will receive a free update
to the program.
Some of the differences between UNIX (TM) Vi and Oak Hill Vi (TM)
that you may find important are:
1. The current version of Oak Hill Vi allows lines to be no more
than 512 characters. Most UNIX Vi editors allow 1024 characters.
2. The entire "ex" editor command set available under UNIX Vi is
not available on Oak Hill Vi. However most of the commonly used
"ex" commands have been included.
10.0 MISCELLANEOUS INFORMATION
=======================================================================
FULL SET OF 8-BIT ASCII CHARACTERS
ASCII characters are encoded into a single byte, or eight
bits. This allows for up to 256 of them. The first 128 codes
(with equivalent decimal values 0 to 127) comprise the upper &
lower case alphabetic characters, numbers, punctuation, and
control characters.
In the IBM PC standard in the United States, codes with
decimal value 128 through 255 comprise an extended character
set that allow for support of some non-English text and
punctuation, international currency symbols, and line-drawing
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 54
capabilities. The table below shows how the characters appear
on your system (these characters may differ depending on your
computer's or printer's character set!).
DEC CHAR DEC CHAR DEC CHAR
------------ ------------ ------------
128 Ç 171 ½ 214 ╓
129 ü 172 ¼ 215 ╫
130 é 173 ¡ 216 ╪
131 â 174 « 217 ┘
132 ä 175 » 218 ┌
133 à 176 ░ 219 █
134 å 177 ▒ 220 ▄
135 ç 178 ▓ 221 ▌
136 ê 179 │ 222 ▐
137 ë 180 ┤ 223 ▀
138 è 181 ╡ 224 α
139 ï 182 ╢ 225 ß
140 î 183 ╖ 226 Γ
141 ì 184 ╕ 227 π
142 Ä 185 ╣ 228 Σ
143 Å 186 ║ 229 σ
144 É 187 ╗ 230 µ
145 æ 188 ╝ 231 τ
146 Æ 189 ╜ 232 Φ
147 ô 190 ╛ 233 Θ
148 ö 191 ┐ 234 Ω
149 ò 192 └ 235 δ
150 û 193 ┴ 236 ∞
151 ù 194 ┬ 237 φ
152 ÿ 195 ├ 238 ε
153 Ö 196 ─ 239 ∩
154 Ü 197 ┼ 240 ≡
155 ¢ 198 ╞ 241 ±
156 £ 199 ╟ 242 ≥
157 ¥ 200 ╚ 243 ≤
158 ₧ 201 ╔ 244 ⌠
159 ƒ 202 ╩ 245 ⌡
160 á 203 ╦ 246 ÷
161 í 204 ╠ 247 ≈
162 ó 205 ═ 248 °
163 ú 206 ╬ 249 ∙
164 ñ 207 ╧ 250 ·
165 Ñ 208 ╨ 251 √
166 ª 209 ╤ 252 ⁿ
167 º 210 ╥ 253 ²
168 ¿ 211 ╙ 254 ■
169 ⌐ 212 ╘ 255
170 ¬ 213 ╒
Using Oak Hill Vi you may edit the file "EXTASCII.TBL" to examine how
your computer represents the extended ascii character set. You
may also experiment with entering codes in the range 128 to 255
(decimal) into a test file as indicated below.
While in the input mode, you may enter any ASCII character into
your text by holding down the <alt> key and entering the decimal
value of the character from the number keypad portion of the
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 55
keyboard. For example pressing <alt>128 and then releasing the
<alt> key will produce the character Ç. If you are typing in a
language other than English you may have frequent need for some of
these characters. They may be mapped with the ":map!" command into
function key or other keystroke combinations that you find useful.
For example, the command sequence
:map! <alt>a <alt>131<cr>
will allow you to simply type <alt>a every time you want the
character â.
Similarly,
:map! <F4> <alt>157<cr>
will subsequently produce the symbol for Yen, ¥, every time
the F4 function key is pressed.
Once you have determined the mappings and keystrokes most
convenient for you, you should include them in your EXRC file so
that they will be automatically activated every time you load Oak
Hill Vi.
A suggested set of mappings is included in the file EXTASCII.MP!.
These may be used directly or edited as you see fit.
DOS ASCII FILES AND THE "LINE TOO LONG" ERROR MESSAGE:
The standard DOS ASCII text file indicates the end of a line
of text with a carriage-return/line-feed (CR-LF) character
sequence. Oak Hill Vi will edit any text file that uses
this sequence or a single line-feed (LF) as the end-of-line
character.
In some cases you may encounter files that use only a single
carriage return (CR) as the end-of-line character. Some text
editors or downloading routines may produce such files. If you
attempt to edit such a file with Oak Hill Vi you may get a
"Line too long" or "File empty" error message. However, you may
convert such a file to a standard DOS ASCII file with the
CR_CRLF.EXE utility supplied with Oak Hill Vi. The command
CR_CRLF FILE1 FILE2
will copy "FILE1" to "FILE2" and substitute a CR-LF pair for every
CR that is not already followed by a LF.
Be especially careful about trying to edit non-ASCII files, for
example files that end in .EXE or .COM. The results can be
unpredictable. If you should accidentally read in an non-ASCII
file, simply exit with a ":q!<cr>". It is important that you not
make any changes in the file, because if you then attempt to write
it back out to disk you will destroy the original file.
In many cases, non-DOS-ASCII files will cause the program to
terminate during the file-read sequence because of the line-length
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 56
limitation (see below).
LINE LENGTH:
Lines are limited to a maximum of 512 characters each. If this
length is exceeded either while editing files or reading files into
the buffer, error messages will be generated.
COMMAND ABBREVIATIONS:
For commands entered after the colon ":" you only need to enter
enough letters to make the chosen command unique. For example,
":sh<cr>" is equivalent to ":shell<cr>", and ":up<cr>" is
equivalent to ":upcase<cr>".
GREETING-SCREEN PAUSE:
Every time the program is started, Oak Hill Vi pauses and
requires an explicit carriage-return to proceed beyond the greeting
screen. You can remove the necessity for a carriage return by
installing a ":set nopress<cr>" command in a EXRC file. See
Sections 5 and 2.9. (The Registered version of Oak Hill Vi does
not generate a pause.)
INTERNAL ERRORS:
If you receive a "Corrupted Pointer Structure -- Program Must
Abort" message, and you have not received any warning messages
about heap exhaustion, then you may have experienced an internal
program error. Please contact Oak Hill Software if this happens,
and supply all the information you can about how the error
occurred, including any error messages you may have received at the
time of the abort.
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 57
11.0 COMMAND INDEX AND QUICK REFERENCE
=======================================================================
Command Action Section
------- ------ -------
A ....... append text at end of line ........................... 2.3
B ....... back up one Word ..................................... 2.1
C ....... change remainder of line ............................. 2.5
D ....... delete remainder of line ............................. 2.4
E ....... move to end of next Word.............................. 2.1
F ....... Fx - find character x (reverse search) ............... 2.2
G ....... jump to end of file (or specified line number) ....... 2.1
H ....... jump to first complete line on screen ................ 2.1
I ....... insert text at front of line ......................... 2.3
J ....... join line below with current line .................... 2.7
L ....... jump to last complete line on screen ................. 2.1
M ....... jump to middle line on screen ........................ 2.1
N ....... move backward to previous pattern match .............. 2.2
O ....... open file for text above current line ................ 2.3
P ....... put stored lines (string) above (before) cursor ...... 2.7
R ....... replace (overstrike) text ............................ 2.7
S ....... substitute text for current line ..................... 2.7
T ....... tx find char following character x (reverse search)... 2.7
W ....... move forward one Word ................................ 2.1
X ....... delete previous character ............................ 2.7
Y ....... yank one line ........................................ 2.6
Z ....... ZZ - write out file and quite editor ................. 2.8
a ....... append ............................................... 2.3
b ....... move back one word ................................... 2.1
c ....... change ............................................... 2.5
d ....... delete ............................................... 2.4
e ....... move to end of word .................................. 2.1
f ....... fx find character x (forward search) ................. 2.2
h ....... move left one character .............................. 2.1
i ....... insert ............................................... 2.3
j ....... move down one line ................................... 2.1
k ....... move up one line ..................................... 2.1
l ....... move right one character ............................. 2.1
m ....... mark line/character position ......................... 2.9
n ....... move forward to next pattern match ................... 2.2
o ....... open file for new text below current line ............ 2.3
p ....... put stored lines (string) below (after) cursor ....... 2.7
r ....... replace single character ............................. 2.7
s ....... substitute text for current character ................ 2.7
t ....... tx find char preceding character x (forward search)... 2.2
u ....... undo last text change ................................ 2.3
v ....... print greeting message and version number ............ 2.9
w ....... move forward to next word ............................ 2.1
x ....... delete one character ................................. 2.7
y ....... yank ................................................. 2.6
z ....... redraw screen around current line .................... 2.2
<ctl-B>.. move back one screenfull ............................. 2.1
<ctl-D>.. scroll down 8 lines .................................. 2.1
<ctl-E>.. scroll up one line maintaining cursor if possible .... 2.1
<ctl-F>.. move forward one screenfull .......................... 2.1
<ctl-H>.. backspace ............................................ 2.1,3
<ctl-L>.. redraw screen ........................................ 2.9
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 58
<ctl-U>.. scroll up 8 lines..................................... 2.1
<ctl-V>.. accept next character literally ...................... 2.3
<ctl-W>.. backspace over last word ............................. 2.3
<ctl-Y>.. scroll down one line maintaining cursor if possible .. 2.1
" ....... name buffer 'x' for yank, delete, or put command ..... 2.9
$ ....... move to last character on line ....................... 2.1
% ....... move to matching {}() character ....................... 2.1
' ....... go to first character of the line named 'x ........... 2.1
( ....... move to previous sentence ............................ 2.1
) ....... move to next sentence ................................ 2.1
} ....... move to next paragraph ............................... 2.1
{ ....... move to previous paragraph ........................... 2.1
]] ...... move to next section ................................. 2.1
]] ...... move to previous section ............................. 2.1
+ ....... move to first character of following line ............ 2.1
, ....... repeat last 'f' or 'F' command but reverse direction.. 2.2
- ....... move to first non-white character of previous line ... 2.1
. ....... repeat last command .................................. 2.3
/ ....... forward pattern search................................ 2.2
0 ....... move to first character on line ...................... 2.1
; ....... repeat last 'f' or 'F' command ....................... 2.2
: ....... colon command series (see below) ..................... 2.7,8,9
? ....... reverse pattern search................................ 2.2
^ ....... move to first non-white character in line ............ 2.1
` ....... go to line and character named `x .................... 2.1
~ ....... reverse case of character ............................ 2.7
! ....... filter lines through external program ................ 2.9
:! ...... escape to MS-DOS ..................................... 2.9
:args ... list files in editing queue .......................... 2.8
:abbr ... abbreviate string1 by macroname while in input mode... 2.7
:center.. center text .......................................... 2.9
:clear .. clear buffers and count remaining heap ............... 2.9
:d ...... delete lines ......................................... 2.7
:e ...... edit another file .................................... 2.8
:f ...... print file name, line number, total characters, etc. . 2.9
:fill ... fill text ............................................ 2.9
:fillp .. fill paragraph ....................................... 2.9
:help ... access on-line help .................................. 2.9
:lowcase convert text to lower case............................ 2.9
:map .... map user-defined characters into a command sequence... 2.9
:map! ... map user-defined characters into input-text sequence.. 2.9
:m ...... move lines ........................................... 2.7
:n ...... edit next file in sequence ........................... 2.1
:p ...... print lines on screen ................................ 2.2,7
:q ...... quit editor........................................... 2.8
:r ...... read file from disk................................... 2.8
:rew .... re-edit first file in queue and rewind queue ......... 2.8
:rfill .. reverse fill text .................................... 2.9
:rfillp . reverse fill paragraph ............................... 2.9
:s ...... substitute ........................................... 2.7
:set .... set parameter (see below) ............................ 2.9
:shell .. escape to MS-DOS ..................................... 2.9
:heap ... measure remaining heap ............................... 2.9
:t ...... transfer (copy) lines ................................ 2.7
:tag .... jump to another file based on a tag label ............ 2.8
:upcase . convert text to upper case............................ 2.9
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED
OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 6.0 -- Page 59
:w ...... write buffer to disk.................................. 2.8
:<n> .... move to line n ....................................... 2.1
:set ai,noai ......... autoindent on/off (default noai) ........ 2.7
:set aw,noaw ......... autowrite on/off (default aw) ........... 2.7
:set beep,nobeep ..... computer speaker on/off (default on) .... 2.7
:set colors .......... set foreground & background colors ...... 2.7
:set ctr=n ........... set centering column (default n=40) ..... 2.7
:set cursor .......... set cursor to box or underscore ......... 2.7
:set esc2='x'......... select additional escape character ...... 2.7
:set ic,noic ......... ignore case on/off (default noic) ....... 2.7
:set showmode,noshowmode show Input mode message (def noshow).. 2.7
:set lines=n ......... screen size in lines .................... 2.7
:set magic,nomagic ... meta character recognition on/off ....... 2.7
:set nu,nonu ......... line number option on/off (default nonu). 2.7
:set press,nopress ... greeting screen pause on/off (default on) 2.7
:set rmar=n .......... right margin set (default n=75) ......... 2.7
:set sections ........ set section delimiter string ............ 2.7
:set ts=n ............ set tab stops every n spaces ............ 2.7
:set wm=n ............ wrap margin spaces (default n=0) ........ 2.7
:set ws,nows ......... wrapscan on search on/off (default nows). 2.7
COPYRIGHT (C) OAK HILL SOFTWARE INC, January 1, 1992, ALL RIGHTS RESERVED