home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR8
/
VMAC.ZIP
/
VDEMACRO.LIB
next >
Wrap
Text File
|
1993-07-31
|
37KB
|
720 lines
A SMALL LIBRARY OF MACROS FOR VDE
for compilation by VMAC.COM
Richard Cowell
THE PURPOSE of this library is to provide people who are disinclined to
learn VDE macro code, or who have no time to work out macros, with a
way to save time on some editing chores. These macros do simple,
practical things -- nothing fancy. If you are a macro adept, they may
hold no surprises for you.
TO USE the library:
* Copy the macro you need to a .VTF or .VTK file.
* Type in the key name and make sure it's in the proper order.
* Compile the file with VMAC.COM.
* Load the resulting .VDF or .VDK file into VDE with the <Alt U>
command.
SMALL CHANGES may be required in some macros to suit your needs. For
example, you may need to change the ^PS print toggle/switch to the one
you want, or you may want to adjust the Insert status (insert,
overwrite, word insert) or the Auto-format status at the end of a macro.
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
The macros are grouped under the following headings:
CHARACTERS
WORDS
LINES
SENTENCES
PARAGRAPHS
FILE
MISCELLANEOUS
________________________________________________________________________________
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* CHARACTERS *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Transpose Characters Right
[ ] B = ^G^D^U
--------------------------------------------------------------------------------
Transpose Characters Left
[ ] B = ^G^S^U
--------------------------------------------------------------------------------
CUre the DOuble-CAp BLues.
IF you notice farther down the line that you didn't lift your finger
off the shift key fast enough and typed two capital letters instead of
one, this macro will go back and change the second one to a small
letter and return the cursor to the end of the line.
This requires VDE Version 1.63+.
[ ] B = ^A[Esc]>Z[[Esc]<A[ ;; Word left. If not capital letter, Start.
= ^D[Esc]>Z[[Esc]<A[ ;; Right. If not capital letter, Start.
= ^^^Qd ;; Change case, End of line.
________________________________________________________________________________
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* WORDS *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Transpose Words Right:
[ ] B = ^T^F^U
--------------------------------------------------------------------------------
Transpose Words Left:
[ ] B = ^T^A^U
--------------------------------------------------------------------------------
Change Word to Upper Case (and go to next word)
This macro changes the word under the cursor to upper case. If the
cursor is on whitespace, it changes the previous word, so it will
change the word you've just typed. This requires VDE Version 1.63+.
For lower case, change (") --> (').
To toggle case, change (") --> (`^). Notice the special character here.
[ ] B = [Esc]$1[Esc]<!1^D ;; Set error. If whitespace, 1). Else Right
= [Esc]1^A^KB^F^KK^K"^QK^KH ;; 1) Word left, Mark & Change. Unmark.
= [Esc]~^M]^F ;; If end of line, Word right.
--------------------------------------------------------------------------------
End of Word
This macro puts the cursor at the end of the current word, and
if called repeatedly, it steps along the ends of succeeding words.
This requires VDE Version 1.63+.
[ ] B = ^D[Esc]> 1^F ;; If next char is whitespace, Next word
= [Esc]1^D[Esc]> 1^S ;; Go right until whitespace. Left.
--------------------------------------------------------------------------------
Quick Underlining (etc.) of words and phrases.
The first macro puts an underline print code (^PS) at the start of the
word under the cursor, and goes to the whitespace at the end of the
word. If called again immediately, it jumps to the end of the next
word, and so on until the end of the line.
The second macro puts another underline print code at the end of the
word just before the cursor. (If there is a punctuation mark at the end
of the word, it puts the code in front of it.)
These macros are very easy to use when assigned to adjacent function
keys. Change ^PS to the printer code(s) you want to use, e.g. ^PB^PS.
This requires VDE Version 1.63+.
[ ] B = [Esc]> 1[Esc]=^M] ;; If not whitespace, 1). If CR, done.
= ^F[Esc]=^M][Esc]!2 ;; Word right. If CR, done. Else 2)
= [Esc]1^D^A^PS ;; 1) Go to start of word. Underline.
= [Esc]2^F[Esc]<!]^S[Esc]<!] ;; 2) Wrd rgh. If < !,done. Left. If < !,done
= ^F[Esc]!2 ;; Wrd rgh. Try again at 2).
[ ] B = ^S[Esc]<![ ;; Left to non-whitespace character
= [Esc]<a2[Esc]>z2
= [Esc]1^D^PS[Esc]!4 ;; 1) [Letters & Numbers]: Right, Underline.
= [Esc]2[Esc]<03[Esc]<:1
= [Esc]<A3[Esc]<[1
= [Esc]3^Ps ;; 3) [Other]: Underline
= [Esc]4^F ;; 4) Word right
________________________________________________________________________________
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* LINES *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Transpose Lines Down:
[ ] B = ^Y^X^U
--------------------------------------------------------------------------------
Transpose Lines Up:
[ ] B = ^Y^E^U
--------------------------------------------------------------------------------
Split Line at Cursor, deleting any spaces immediately in front of cursor
[ ] B = ^S[Esc]= <^D[Esc]~ 1^T[Esc]1^N
--------------------------------------------------------------------------------
Change Whole Line to Upper Case
For lower case, change (") --> (').
To toggle case, change (") --> (`^). Notice the special character.
[ ] B = ^QS^KB^QD^KK^K"^KH^X
--------------------------------------------------------------------------------
Change Line to Upper Case from start to cursor
For lower case, change (") --> (').
To toggle case, change (") --> (`^). Notice the special character.
[ ] B = ^KK^QS^KB^K"^QK^KH
--------------------------------------------------------------------------------
Indent Current Line to Next Tab Stop
[ ] B = [Esc]$1[Esc]*i^QS^S^M ;; Give previous line hard CR.
= [Esc]1[Esc]= >[Esc]*F[Esc]*I^I ;; Go to non-space char. Tab.
{ = [Esc]*f[Esc]*i } ;; {Change settings, if desired}
--------------------------------------------------------------------------------
Indent Current Line to First Tab Stop
This assumes the current line starts at, or to the right of, the left
margin.
[ ] B = [Esc]$1^QS^S[Esc]*i^M ;; Give previous line hard CR
= [Esc]1[Esc]$2^B^E ;; Reformat. Up
= [Esc]2[Esc]$4^QS^S[Esc]$3^S[Esc]= 2 ;; Beginning of paragraph.
= ^D[Esc]3^D
= [Esc]4[Esc]*I ^H^I ;; Ins on. Cursor to LM. Tab
= [Esc]~ ]^T ;; If no space, done. Del spaces.
--- The following lines can be used in place
--- of the last line to change the settings
{ = [Esc]~ 5^T ;; If no space, 5). Del spaces. }
{ = [Esc]5[Esc]*i ;; Turn Ins off }
--------------------------------------------------------------------------------
Enhance Whole Line
This macro brackets the non-space characters on a line with printer
codes.
Change ^PS to the printer code or codes you want to use.
[ ] B = ^QS[Esc]~ 1^F[Esc]1^PS ;; Put code in front of 1st non-space character
= ^QD^S[Esc]= <^D^PS ;; Put code after last non-space character
--------------------------------------------------------------------------------
Center and Enhance
This macro centers a line and brackets it with printer codes.
Subsitute the printer codes you want to use for ^PS, e.g. ^PS^PB.
[ ] B = ^OC^S^QD^PS ;; Center. Go to end of centered line. Code = ^Qs[Esc]~ 1^F ;; Go to first character
= ^QS[Esc]~ 1^F ;; Go to first character
= [Esc]1^PS^X^QS ;; Code. Down. Beginning of line.
--------------------------------------------------------------------------------
Center a Line of Double-Width Characters.
This assumes that you have assigned the printer control code for double-
width characters to ^PD. If not, change 'D' to the appropriate letter.
If you want to add other printer codes like underlining, change ^PD to
^PD^PS or whatever.
[ ] B = [Esc]*f^QS[Esc]~ 1^F ;; Auto-format off. Go to 1st char
= [Esc]1^KB^QD ;; Left mark. End
= [Esc]2^S[Esc]~ 3^G[Esc]!2[Esc]3^D ;; Delete trailing spaces
= ^KK^KC^OC ;; Right mark. Copy. Center.
= ^KY^PD^QD^PD ;; Del block, Code. End. Code.
;; (^Ky moves cursor to 1st char)
= [Esc]*F ;; Turn auto-format on
{ The last line can be deleted if desired }
Operational note: Copying the line to double the length before
centering yields accurate results even when proportional spacing is
in effect, unlike methods that count the number of characters and
use an equal number of spaces at the end of the line.
--------------------------------------------------------------------------------
Vertical Line
In both pairs of macros, the first one sets one tab at the cursor
position, and then chains to the second macro. Since the No-Repeat mode
is not specified for the second one, you will be prompted for the
number of times to repeat i.e. the length of the line. You may need to
reset the insert status and the tabs after using these macros.
Possible changes:
1) The key name of the second macro can be changed to any letter
or number key. (Function keys cannot be used for chaining.) If
it is changed, be sure to change the X in the [Esc]&X command of
the first macro.
2) You should substitue the character you want to use for @GV, for
example | or @GL.
Vertical Line (Overwrite Mode).
This macro overwrites any characters that happen to be where the line is
drawn.
For VDE version prior to 1.63, change ^ON* to ^OI#
[ ] B = [Esc]*f[Esc]*i^ON*^M^OI^M ;; AF off. Ins off. Clear tabs. Set tab.
= [Esc]&X ;; chain to [X]
[X] Q = @GV^M^I ;; Write character, CR, Tab.
Vertical Line (Insert Mode).
This macro shifts any characters that happen to be where the line is
drawn one column to the right.
For VDE version prior to 1.63, change ^ON* to ^OI#
[ ] B = [Esc]*f^ON*^M^OI^M ;; AF off. Clear tabs. Set tab at cursor.
= [Esc]&X ;; chain to [X]
[X] Q = [Esc]*I@GV[Esc]*i^M^I ;; Ins on. Write character. Ins off. CR, Tab.
________________________________________________________________________________
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* SENTENCES *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Beginning of Sentence (1).
This assumes sentences end with a period.
This requires VDE Version 1.63+.
[ ] B = ^A[Esc]<![ ;; Word left. If whitespace, GoTo start.
= [Esc]~.< ;; Go back to previous period
= ^D[Esc]> [ ;; If next char not whitespace, GoTo start.
= [Esc]2^D[Esc]<!2 ;; Go forward past whitespace
------------------------------------------------------------------------------------------------------------------------
Beginning of Sentence (2).
This assumes sentences end with a period or question mark. This macro is
slower than the previous one.
This requires VDE Version 1.63+.
[ ] B = ^A[Esc]<![ ;; Word left. If whitespace, GoTo start.
= [Esc]1^S[Esc]=?2[Esc]~.1 ;; 1) Left. If '?',2). If not '.', 1)
= ^D[Esc]> [ ;; If char. after '.' is not white,GoTo start
= [Esc]2^D[Esc]<!2 ;; 2) Go forward past whitespace
--------------------------------------------------------------------------------
Next Sentence (1).
This assumes sentences end with a period.
This requires VDE Version 1.63+.
[ ] B = [Esc]~.> ;; Go forward to period
= ^D[Esc]<!1^F[Esc]![ ;; If next char. whitespace, 1),else Start
= [Esc]1^D[Esc]<!1 ;; Go forward past whitespace
--------------------------------------------------------------------------------
Next Sentence (2).
This assumes sentences end with a period or question mark. This macro is
slower than the previous one.
This requires VDE Version 1.63+.
[ ] B = [Esc]>?1[Esc]=.2[Esc]=?3 ;; If > '?', 1). If '.', 2). If '?', 3).
= [Esc]1^D[Esc]![ ;; 1) Forward. GoTo Start.
= [Esc]2^D[Esc]> 1 ;; 2) If char after '.' not white, 1)
= [Esc]3^D[Esc]<!3 ;; 3) Go forward past whitespace
--------------------------------------------------------------------------------
Transpose Sentences Right.
This assumes sentences end with a period. The cursor can be anywhere in
the first sentence.
This requires VDE Version 1.63+.
NOTE: If auto-format is off, you will probably need to reformat the
paragraph.
--- Beginning of Sentence
[ ] B = [Esc]$1[Esc]~.< ;; Go back to previous period. If none, 1).
= ^D[Esc]<!0 ;; If next char whitespace, 1)
= ^A[Esc]![ ;; Word left. GoTo start.
= [Esc]0^D[Esc]1[Esc]<!0 ;; 1) Go forward past whitespace
= ^KB ;; Left mark.
--- End of Sentence
= [Esc]2[Esc]$][Esc]~.> ;; 2) Go forward to period
= ^D[Esc]> 2 ;; If next char not whitespace, 2)
= ^D^KK ;; Right. Right mark
--- Delete Whitespace
= [Esc](1)[Esc]> 3^T ;; Count=1. If not white, 3), else del word
--- End of Next Sentence
= [Esc]3[Esc]$4[Esc]~.> ;; 3) Go forward to period
= ^D[Esc]=^M4 ;; Right. If EOF or CR 4)
= [Esc]<!5[Esc]!3 ;; If white, 5), else 3)
= [Esc]4^_[Esc]+ ;; 4) Insert space. Count+
= [Esc]5^D ;; 5) Skip space.
--- Move
= [Esc]6^KV^QK^KH[Esc]-]^H ;; 6) Move. GoTo Right Mark. If EOF or CR was
found, delete final space.
________________________________________________________________________________
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* PARAGRAPHS *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Beginning of Paragraph
This macro puts the cursor at the beginning of a paragraph. If it's
already at the beginning, it goes to the start of the previous
paragraph.
[ ] B = ^S[Esc]=^M< ;; Left. Skip CRs
= [Esc]1^QS^S^S[Esc]= 1^D^D ;; Go to beginning of paragraph
--------------------------------------------------------------------------------
End of Paragraph
This macro puts the cursor on the CR at the end of a paragraph. If
it's already at the end, it goes to the end of the next paragraph.
[ ] B = [Esc]=^M>[Esc]1^D^D^QD^S[Esc]= 1^D
--------------------------------------------------------------------------------
Next Paragraph
[ ] B = ^D[Esc]1^D^D^QD^S[Esc]= 1 ;; Go to end of paragraph
= ^D[Esc]=^M>[Esc]= > ;; Skip CRs and spaces
--------------------------------------------------------------------------------
Transpose Paragraphs Down.
[ ] B = [Esc]$2^QS^S[Esc]$1^S[Esc]= [ ;; Beginning of paragraph.
= ^D[Esc]1^D
= [Esc]2^KB ;; Left block mark.
= [Esc]3^D^D^QD^S[Esc]= 3 ;; End of paragraph.
= ^D^D[Esc]~^M4^D
= [Esc]4^KK[Esc]=^M>[Esc]$6 ;; Rgh. Rgh mark. Skip blank lines
= [Esc]5^D^D^QD^S[Esc]= 5 ;; End of paragraph. Right.
= ^D^D[Esc]~^M7^D[Esc]!7
= [Esc]6^M ;; If end of file, CR.
= [Esc]7^KV^KH ;; Move. Unmark.
--------------------------------------------------------------------------------
Soften Paragraph (1).
This assumes that the left margin is at Column 1, and that a new
paragraph is indicated either by indentation or a blank line. The
cursor should be placed on the first line of the paragraph.
[ ] B = ^QD^D[Esc]=^M][Esc]= ] ;; Start of next line. If CR or space, done
= ^S^S[Esc]= 1^D` ;; Go back. If soft CR, 1). Else add space
= [Esc]1^D^D[Esc]![ ;; Go to next line. Go back to Start
--------------------------------------------------------------------------------
Soften Paragraph (2).
This assumes that paragraphs are separated by blank lines. The left
margin can be anywhere. The cursor should be placed on the first line
of the paragraph.
[ ] B = ^QD^D[Esc]=^M] ;; Start of next line. If blank, done
= ^S^S[Esc]= 1^D` ;; Go back. If soft CR, 1). Else add space
= [Esc]1^D^D[Esc]![ ;; Go to next line. Go back to Start
--------------------------------------------------------------------------------
Outdent Paragraph
This assumes the left margin (LM) is at Column 1 or a tab stop. The
cursor can be anywhere in the paragraph.
LM Tab LM Tab
____|___|______________ ____|___|______________
│ │ │ │
│ AAAAAA bbb cccc │ │ AAAAAA bbb cccc │
│ ddddd eee ff gg │ ===> │ ddddd eee ff │
│ hhhh iiiiii │ │ gg hhhh iiiiii │
│_______________________│ │_______________________│
[ ] B = [Esc]$2^QS^S[Esc]$1^S[Esc]= [ ;; Beginning of paragraph.
= ^D[Esc]1^D
= [Esc]2[Esc]$]^QD^S[Esc]~ 3^QS ;; If 1st line ends in hard CR, 3)
= [Esc]*F^OG[!Tab] ;; AF on. parGrph Tab, Shift-Tab
= [Esc]~ 3^T ;; If 1st char is space, del spaces
= [Esc]3^B ;; 3) Reformat
This line can be added if desired.
{ = [Esc]*f ;; Turn Auto-format off }
--------------------------------------------------------------------------------
Start New Indented Paragraph at cursor.
This macro splits the line at the cursor and indents the new line
[ ] B = [Esc]*I ;; Ins on
= [Esc]= 1^S ;; If space, 1). Left.
= [Esc]1[Esc]= <^D[Esc]~ 2^T ;; 1) remove spaces in front of cursor
= [Esc]2^M^I ;; 2) split line, indent new line
= ^E^QD ;; Return to end of previous line
One of these lines can be added if desired.
{ = [Esc]*i ;; Turn Ins off }
{ = [Esc]*W ;; Turn WIns on }
--------------------------------------------------------------------------------
Block Paragraph Reformat
This macro sets the left margin to the start of the paragraph before
reformatting. It's useful if you use various left margin settings in
one document.
[ ] B = [Esc]$2^QS^S[Esc]$1^S[Esc]= [ ;; Beginning of paragraph.
= ^D[Esc]1^D
= [Esc]2[Esc]= > ;; Skip spaces
= ^OL^M^B ;; Set left margin. Reformat.
________________________________________________________________________________
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* FILE *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The range of these macros can be limited with the Zoom feature of VDE.
--------------------------------------------------------------------------------
Remove All Blank Lines from a file (EOF = end of file)
[ ] B = [Esc]$Z^QR ;; Set error. Beginning of file
= [Esc]1[Esc]=^M2 ;; 1) If blank line, 2)
= ^X[Esc]!1 ;; Next line. Loop back to 1).
= [Esc]2^Y^X^E[Esc]!1 ;; 2) Delete blank. Check for EOF. 1)
= [Esc]Z^QR ;; Beginning of file
--------------------------------------------------------------------------------
Remove Leading Spaces from all lines in a file.
This macro makes every line flush against the left side of the screen.
[ ] B = [Esc]*f[Esc]$Z^QR ;; AF off. Set error. Beginning of file
= [Esc]1[Esc]~ 2^T ;; 1) If not space, 2), else Del word right
= [Esc]2^X[Esc]!1 ;; 2) Down. Loop back to 1)
= [Esc]Z^QR[Esc]*F ;; Beginning of file. Auto-format on.
{ [Esc]*F can be deleted if desired }
--------------------------------------------------------------------------------
Auto-Numbering starting at 1, from cursor to end of file
[ ] B = ^KB^QC^KK ;; left mark, GoTo end of file, right mark
= ^K#1^M ;; auto-number starting at 1
= ^QB^KH ;; GoTo left mark, unmark
--------------------------------------------------------------------------------
Remove Extra Spaces from ends of lines
This macro cleans up the ends of lines prior to reformating or prior to
printing by removing all but one space at the ends of lines with a soft
CR.
[ ] B = [Esc]*f[Esc]$Z^QR ;; AF off. Set error. Beginning of file.
= [Esc]1^D^D^D^QD ;; 1) Right(3x), End of line.
= ^S[Esc]~ 1 ;; Left. If not space, 1)
= [Esc]2^S[Esc]~ 1^G[Esc]!2 ;; 2) Left. If not space, 1), else Del, 2)
= [Esc]Z^QR[Esc]*F ;; Beginning of file. Auto-format on.
{ [Esc]*F can be deleted if desired }
--------------------------------------------------------------------------------
Reformat Indented Paragraphs (single-spaced text)
This macro preserves the indentation of single lines ending in a hard
CR, that is, it does not move them to the left margin as the usual ^B
command does.
It assumes that the left margin has not been changed!!
It is useful for adding or eliminating proportional spacing or changing
the right margin.
[ ] B = ^QR[Esc]*F[Esc]*I[Esc]$Z ;; BOF. AF on. Ins on. Set error.
= [Esc]1[Esc]=^M> ^H ;; 1) Skip CRs. Nudge to place cursor.
= [Esc]~ 2 ;; If no initial space, jump to reformat
= ^QD^S[Esc]= 2^D[Esc]!1 ;; If soft CR, 3).Else right. Back to 1)
= [Esc]2^B[Esc]!1 ;; 3) Reformat. Loop back.
= [Esc]Z^QR[Esc]*W ;; 4) BOF.
Reformat Indented Paragraphs (double-spaced text)
This is similar to the above macro but for double-spaced text. It will
also change single-spaced to double-spaced text. Again, it assumes that
the left margin hasn't been changed.
[ ] B = ^QR[Esc]*F[Esc]*I[Esc]*D[Esc]$Z ;; BOF. AF on. Ins on. DS on. Set error
= [Esc]1[Esc]=^M> ;; Skip CRs
= ` ^H[Esc]~ R^QD^S[Esc]= R ;; Nudge. If no space, or soft CR, jump
= ^QS^_^G^X^X[Esc]!1 ;; Nudge again. Down. Down. Loop back.
= [Esc]R^B[Esc]!1 ;; Reformat. Loop back.
= [Esc]Z^QR ;; BOF
--------------------------------------------------------------------------------
Block Paragraph Reformat (with varying left margins)
This macro sets the left margin to the start of each paragraph before
reformatting. It is useful if you use different left margins in the
same document and want to change the right margin or change to
proportional spacing.
[ ] B = [Esc]$Z^QR ;; Set error. BOF
= [Esc]1[Esc]=^M>[Esc]= > ;; 1) Skip CRs. Skip spaces.
= ^OL^M^B[Esc]!1 ;; Set left margin, Reformat, 1)
= [Esc]Z^QR ;; Z) BOF
________________________________________________________________________________
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* MISCELLANEOUS *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
___________
TABLE MAKER
~~~~~~~~~~~
Starting Finishing
cursor Tab cursor Tab
| ______________|_________ | _______________|_________
`--->│Xaaaaaaaa │ `-->│Xaaaaaaaa eeeeeee │
│bbbbbbb │ │bbbbbbb fffff │
│ccccc │ │ccccc gggggggg │
│ddddddd │ │ddddddd hhhhhh │
blank │<- │ ====> │ iiii │
│eeeeeee │ │ │
│fffff │ │ │
│gggggggg │ │ │
│hhhhhh │ │ │
│iiii │ │ │
blank │<- │ │ │
│________________________│ │_________________________│
This macro operates on two sets of data separated by one blank line.
The second set should also end with a blank line if it's not the end of
the file. As illustrated above, it moves the second set up to the tab
stop on the same lines as the first set. The starting cursor can
actually be anywhere on the first line of the first set of data. The
number of lines in each data set does not have to be the same.
Since this macro uses a Place Marker (^KM), there shouldn't be any
Place Markers in the file when the macro is called. If there are, first
use the zoom feature of VDE on the relevant lines. For VDE versions
prior to 1.64, change ^KM to ^PZ and ^QM to ^QZ.
[ ] B = [Esc](1)[Esc]*i[Esc]*f ;; Counter = 1. Ins off. AF off
= ^QS[Esc]$4 ;; Home. Set error.
--- Main loop ---
= [Esc]1^KM ;; 1) Set Place
= [Esc]2^X[Esc]~^M2^X ;; 2) Go to line after 1st blank one
= [Esc]=^M3 ;; If blank, 3)
= [Esc]+^Y^QM^I^U ;; Count+, Del line. GoTo Place, Tab, Undo
= ^QS^G^X^G ;; Home, Del Place. Down, Del blank line.
= [Esc]~^M1^N[Esc]!1 ;; If not blnk, 1), else insert line so
;; that the loop at 2) works, 1)
--- Clean-up ---
= [Esc]3^G^QM^H ;; 3) Del blank line. GoTo Place, Del Place.
= ^X[Esc]~^M5^G[Esc]!5 ;; Down. If blank, delete. 5)
= [Esc]4^H^H[Esc]-] ;; 4) [EOF]: Del Place, Decrement count
= [Esc]5^E[Esc]-6[Esc]!5 ;; 5) Up to top of column
= [Esc]6[Esc]*I[Esc]*F ;; Ins on, Auto-format on
{Delete [Esc]*I or change to [Esc]*W if necessary}
This line can be substituted for the last two lines
if no adjustment of the insert and auto-format
status is needed.
{ = [Esc]5^E[Esc]-][Esc]!5 ;; 5) Up to top of column. Finished. }
--------------------------------------------------------------------------------
Clear Next Tab. Companion macro for the Table Maker.
This is for making several columns successively. Set up the data
separated by blank lines, and set the tabs for the columns. After using
the Table Maker, use this macro to clear the next tab; and without
moving the cursor, call the Table Maker again.
If you assign the Table Maker to a function key and assign this macro
to a neighboring key, they are very easy to use.
[ ] B = [Esc]*i^I^ON^M
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
________________________
PRINTING DOUBLE COULUMNS
~~~~~~~~~~~~~~~~~~~~~~~~
On Screen On Paper
________________________ _______________________________
│aa bbbbbb cc │ │ aa bbbbbb cc zzzzzzzzz aaa │
│ddd eeeee f │ │ ddd eeeee f bbbb cccc dd │
│ggg hh iiiii │ │ ggg hh iiiii eeeee fff ggg │
│jj kkkkkkk ll │ │ jj kkkkkkk ll hhh ii jjjjj k │
│mmmm nnnnnnnn │ ====> │ mmmm nnnnnnnn lllll mmmm nnn │
│ooo ppppp qqq │ │ ooo ppppp qqq ooooo ppppp qq │
│rrrrr sss t u │ │ rrrrr sss t u rrrr sss ttttt │
│vvvvv wwwwww │ │ vvvvv wwwwww uuu vv wwww xx │
│xxxxx yyyyy │ │ xxxxx yyyyy yyy zzzzz aaaa │
Page │------------------------│ │-------------------------------│
Break │zzzzzzzzz aaa │ │ │
│bbbb cccc dd │ │ │
│eeeee fff ggg │ │ (1st pass) (2nd pass) │
│hhh ii jjjjj k │ │ │
The principle is very simple. In VDE, set the right margin to the width
of a column and set the page length to the length of a standard page.
Proportional spacing can also be set to get more words per line. Then
just type normally.
The printing is done in two passes.
1) First, the printer margins are set for the left column and all the
odd-numbered pages are printed using the 'O' option in the printer
setup in ^KP.
2) Then, the printer margins are set for the right column and, using
the same paper, all the even-numbered pages are printed with the 'E'
option.
Three macros are needed. One to set the margins and page length in VDE,
and two for printing the left and right columns. The values used in the
macros below provide 1-column wide left and right margins with a
2-column spacer in the center, and a page length of 60 with a 3-line top
margin. These values can be changed to suit your needs.
----------------------------------------
Margins and Page Length
[ ] B = ^OR38^M^OP60^M ;; Right margin = 38, Page length = 60
----------------------------------------
Printer Setups (Epson)
If you don't want to see the setups on the screen, change the macro
mode to B and add ^M to the end of the macro.
Left Column (1st Pass):
[ ] N = ^KP'^P[Esc]`@^P[Esc]l^A^P[Esc]Q'''OT3
~~~~~~~~~\~~~~~~~~~\~~~~~~~~~\~\~\Top margin: 3 lines
\ \ \ \
\ \ \ \Odd pages
\ \ \
\ \ \RM = 39: Esc Q ' {Use '' in VDE}
\ \
\ \LM = 1: Esc l 1 {small L, ^A = one}
\
\Initialization: Esc @ {Use `@ for VMAC}
Right Column (2nd Pass):
[ ] N = ^KP'^P[Esc]`@^P[Esc]l)^P[Esc]QO'ET3
~~~~~~~~~\~~~~~~~~\~~~~~~~~\~\~\Top margin: 3 lines
\ \ \ \
\ \ \ \Even pages
\ \ \
\ \ \RM = 79: Esc Q O
\ \
\ \LM = 41: Esc l )
\
\Initialization: Esc @ {Use `@ for VMAC}
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
______
BLANKS
~~~~~~
_____________________ ____________________
│ │ │ │
│ xxxxx @xxx xxx# xx │ │ xxxxx _________ xx │
│ xx xxxxxx xxxx xxx │ │ xx xxxxxx xxxx xxx │
│ xxxxx xxx xx @xxxx │ ===> │ xxxxx xxx xx _____ │
│ xxx xxxxxx# xxx xx │ │ ___________ xxx xx │
│ xxxxx xxxxx xxxx x │ │ xxxxx xxxxx xxxx x │
│ xxxx @x x xx# xxx │ │ xxxx ________ xxx │
│ │ │ │
│____________________│ │____________________│
This macro creates an underlined blank space between, and including, all
the pairs of special characters in a file. In the macro below the
characters are:
Start: @
Finish: #
but they can be changed to anything you like.
To use, go through a file and mark the places that you want to turn
into blanks with '@'-'#' pairs, go to the beginning of the file, and
then call the macro. It will bracket each place with the underline
print toggle (^PS) and overwrite '@', '#', and everything in between
with spaces.
[ ] B = [Esc]*i[Esc]*f[Esc]$4 ;; Overwrite. AF off. Set error.
= ^QF`@^MG^M ;; Find '@'
= [Esc]1^PS ;; 1) Underline
= [Esc]2 [Esc]=#3[Esc]~^M2 ;; 2) Overwrite with spces until '#' or CR
= ^PS^X^QS^PS[Esc]=#3[Esc]!2 ;; [CR]: Undrlin. Down. Home. Undrlin.2)
= [Esc]3 ^PS^L[Esc]$4[Esc]!1 ;; 3) [#]: Space, Underline, Again '@', 1)
= [Esc]4[Esc]*I[Esc]*F ;; 4) Ins on, Auto-format on
{ Delete [Esc]*I or change to [Esc]*W if necessary}
This line can be substituted for the last two
lines if no adjustment of the insert and auto-
format status is needed.
{ = [Esc]3 ^PS^L[Esc]!1 ;; 3) [#]: Space, Underline, Again '@', 1) }