Vi
Larry Baca
vwa0201 at marst2.UUCP
Thu Jun 8 01:42:45 AEST 1989
In article <19890 at adm.BRL.MIL>, thoyt at ddn-wms.arpa (Thomas Hoyt) writes:
> Folks:
> Can Vi reformat a paragraph, justifying it properly(left, right, or center-
> ed)? I hate editing text when I have to rejustify the right margin by hand
> after deleting or adding to a line at the top of a paragraph. If it is possible,
> how can I do it? Thanks much.
/\/\/\/\/\/\/\/\/\/\/\/\
Maybe this will help....
/\/\/\/\/\/\/\/\/\/\/\/\
Printed 5/25/89 1
para(1) UNIX Programmer's Manual para(1)
NNNAAAMMMEEE
para - A New vi FEATURE
SSSYYYNNNTTTAAAXXX
None
FFFUUUNNNCCCTTTIIIOOONNNAAALLL DDDEEESSSCCCRRRIIIPPPTTTIIIOOONNN
For those users who use the vi editor to do correspondence,
rather than Qoffice, there is a new feature available now
for the vi editor which will allow you to insert or delete
text and have the system re-wrap the text for you. No
longer will you have to manually edit each line affected
when a change is made.
The program, obtained from Gould as public-domain, is called
pppaaarrraaa and requires only one addition to each user's library.
A ...eeexxxrrrccc file must be established (if not already there) in
each user's home directory that wishes to use para, which
contains information similar to the following:
set redraw ai tabstop=0 ignorecase
map #1 !}para -l79
map #2 !}para -l75 -i5
map #3 !}para -l70 -i10
map #4 !}para -l65 -i15
map ^[n !}para -l79 -i5
map ^[m !}para -l75 -i10
map ^[v !}para -l70 -i5
map ^[t !}para -l65 -i10
The ###111,,, ###222,,, ###333,,, ###444 parameters relate to the PF1-PF4 keys on
the 10-key pad on the Visual keyboards; the ^^^[[[nnn,,, ^^^[[[mmm,,, ^^^[[[vvv
aaannnddd ^^^[[[ttt refer to pressing the <<<EEESSSCCC>>> key followed by nnn,,, mmm,,, vvv
ooorrr ttt respectively.
The ---lll parameter followed by a number equates to the number
of characters per line desired; the ---iii parameter equates to
the number of characters to be indented.
The rewrap function occurs from the point at which the cur-
sor is positioned when the appropriate key is pressed
through the remainder of the paragraph. Therefore, you may
want to set up function keys that will indent the first line
of the paragraph five spaces more than the remainder of the
paragraph. For example, positioning the cursor on the first
line of a pargraph and pressing the #1 (PF3) key would
indent that line 10 spaces; moving the cursor to the next
line and pressing the <ESC> v key would indent the remainder
of the paragraph only 5 spaces.
You may choose which keys to set up to perform various
Printed 5/25/89 1
para(1) UNIX Programmer's Manual para(1)
rewapping of lines; be careful, however, that you don't make
it too complicated for the user to remember!
Printed 5/25/89 2
--
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
LARRY BACA, SYSTEM ADMINISTRATOR, [4m(MARST1 MARST2)[0m marst2!lbaca
DAASO-VWA AIS, DEFENSE AUTOMATIC ADDRESSING OFFICE, WESTERN DIVISION
DDTC TRACY, TRACY CA. 95376-5057 AUTOVON 462-9391 COMERCIAL 832-9391
More information about the Comp.unix.questions
mailing list