HELP JUSTIFY Ian Rogers, July 1987
CONTENTS - (Use <ENTER> g to access required sections)
-- *ved_jcp, justify current procedure
-- *ved_j, justify marked ranged
-- *ved_jp, justify paragraph
-- *ved_jj, left and right justify marked range
-- *ved_jjp, left and right justify current paragraph
-- more on justifying procedures
-- related information
-- *ved_jcp, justify current procedure ---------------------------------
<ENTER> jcp
Inserts and deletes spaces so that the code in the procedure that
surrounds the cursor is indented neatly.
-- *ved_j, justify marked ranged -------------------------------------
<ENTER> j
If the marked range is in a text file, it moves words at line breaks
so as to fill the lines up to the margin (if possible). Otherwise,
if it is in a program file, it indents the code, in the same way as
ved_jcp, but only in the marked range.
-- *ved_jp, justify paragraph -----------------------------------------
<ENTER> jp
Moves words at line breaks in the current paragraph, so that lines fit
into the margins. No need to mark the paragraph.
-- *ved_jj, left and right justify marked range -----------------------
<ENTER> jj
Align the text in the marked range with both the left and right margins,
by inserting spaces between words.
-- *ved_jjp, left and right justify current paragraph ------------------
<ENTER> jjp
Align the text in the current paragraph with both the left and right
margins, by inserting spaces between words. No need to mark the
paragraph.
-- more on justifying procedures --------------------------------------
To be able to justify program code, the justifying procedures must
know when to increase the indentation level, and when to decrease it.
They do this by looking in the two lists *VEDOPENERS and *VEDCLOSERS. As
might be expected, VEDOPENERS contains the words that indicate where
indentation is to be increased, and VEDCLOSERS contains the words that
indicate where indentation is to be decreased.
E.g. a neat piece of code may look like this :-
if foo = 1 then
baz();
endif;
Therefore the word if is contained in VEDOPENERS, and the word endif is
contained in VEDCLOSERS.
-- related information ------------------------------------------------
See also,
HELP *MARK - on other procedures to do with marked ranges
HELP *PAGE - simple text formatting in VED
--- C.all/help/justify -------------------------------------------------
--- Copyright University of Sussex 1987. All rights reserved. ----------Author: Ian Rogers, July 1987