


===================
    Chapter 10

  ADVANCED TOPICS
===================


10.1  HOT Keys And Dormancy

     When you are using CygnusEd Professional you may find that you are
constantly entering and exiting out of the editor, only to start it up
again moments later.  If you have CygnusEd Professional on a floppy drive
then this is inefficient because it takes a while to load CygnusEd
Professional from floppy.  If you have CygnusEd Professional on a ram disk
then this is inefficient because when you are using CygnusEd Professional
there are actually two copies in memory, one in the ram disk and the other
being executed.  The HOT-START function of CygnusEd Professional is
designed to fix this problem.  With this feature of CygnusEd Professional
enabled you can make CygnusEd Professional stay in memory when you exit so
that it can be revived with a hot key, a CLI program or a WorkBench
program.

     CygnusEd Professional provides two "NOT KEYS" that CygnusEd
Professional will hear from anywhere on the Amiga (CygnusEd Professional
doesn't have to be the active window to hear them!).

     These two commands will tell a CygnusEd Professional that is already
running somewhere on the system to become active or to kill itself off.

     The HOT-Start Enabled mode (set in the GLOBAL SETTINGS menu) will
cause CygnusEd Professional to become dormant when you quit out of the last
view CygnusEd Professional is displaying.  This dormancy is a state where
CygnusEd Professional is still in memory, but is waiting for one of the HOT
keys or the ED activator program (provided with CygnusEd Professional, see
also ED - THE CygnusEd Professional ACTIVATOR) to be executed.

                                  Page 75

----------------------------------------------------------------------------



     The reason you would want to leave CygnusEd Professional dormant in
memory is because then you don't have to load it from the disk the next
time you use it.  In fact, you don't even have to type the command line, or
click on any icons, if you don't want to.

     To allow CygnusEd Professional to become dormant after you are
finished editing, you must first activate the HOT-Start Enabled option,
otherwise CygnusEd Professional will exit completely.  If the option is
activated, then when you quit the last view, CygnusEd Professional will
become dormant and wait for one of the following:

     1.  HOT-START

     Pressing RIGHT-ALT + RIGHT-SHIFT + RETURN together will cause CygnusEd
Professional to start up with a clear file instantly.  You can use this
while CygnusEd Professional is open already; the CygnusEd Professional
screen will pop to the front and become the active window.  When CygnusEd
Professional is dormant it does its best to reduce the amount of memory it
consumes.

     2.  HOT-KILL

     RIGHT-ALT + RIGHT-SHIFT + CONTROL + RETURN together will cause a
dormant CygnusEd Professional to kill itself off completely.  This will
free up the memory that a dormant CygnusEd Professional takes up (because a
dormant CygnusEd Professional is still in memory).  If CygnusEd
Professional is open already then the CygnusEd Professional screen will pop
to the front and become the active window (and NOT be killed off).

     3.  ED ACTIVATOR

     The ED program provided on the CygnusEd Professional distribution disk
will pass file name(s) to CygnusEd Professional to edit.  If CygnusEd
Professional is dormant at the time, it will activate CygnusEd Professional
much the same as HOT-START does.  See Section 13 - ED - THE CygnusEd
Professional ACTIVATOR for more information on ED.

     CygnusEd Professional can be started up initially in a dormant state
without displaying a screen at all.  Many people will find this very useful
as they can then start up CygnusEd Professional in their S:Startup-Sequence
script and then have CygnusEd Professional available on call with the
HOT-START sequence.

                                  Page 76

----------------------------------------------------------------------------



     To start CygnusEd Professional up as dormant, you must use the CLI or
modify your Startup-Sequence to contain the line:

     CED -r

     CygnusEd Professional will then load into memory and will become
dormant, waiting for a signal via the HOT keys or ED.

     CygnusEd Professional is designed to detach itself from the invoking
CLI so that the invoking CLI can itself be closed without waiting for
CygnusEd Professional to terminate.  Thus "CED -r" in a startup-sequence
will not interfere with the initial CLI closing at the end of the
startup-sequence with an "EndCLI".  However, if CygnusEd Professional has
been disconnected from its invoking CLI, then it will no longer be able to
execute DOS commands (ARexx commands will still function however).

     To keep CygnusEd Professional from disconnecting itself from the
invoking CLI, use the "-keepio" command line option.  This will allow DOS
commands to be launched from within CygnusEd Professional.  If you elect to
use -keepio then you should "run" CygnusEd Professional so that your CLI
will continue to be available for your use while CygnusEd Professional is
running.  More information on this can be found in the "Executing DOS
commands" section.


10.2  Starting CygnusEd Professional With Multiple Files

     When you start up CygnusEd Professional, you can specify more than one
file (up to 10, in fact).  When you do, all the files you have specified
will be loaded in and displayed in seperate views.

     From the CLI, just enter:

     CED file1 file2 file3

     From the WorkBench, you can use the extended-select feature of the
WorkBench.  This is done by clicking on the first file once with your left
mouse button,  then hold the SHIFT key down while clicking once on the next
file(s).  When you have selected all the files you want to edit, click
twice on the CED icon - while still holding the SHIFT key down.  If one of
the files you want to edit has CygnusEd Professional as its "default tool"
(program that gets run when you double click on it) then you can double
click last on this file instead of on the CED icon.

                                  Page 77

----------------------------------------------------------------------------



10.3  Using the Columnar Block Effectively

     A feature which sets CygnusEd Professional apart from most editors is
CygnusEd Professional's ability to operate on vertical as well as
horizontal blocks.  The common MARK BLOCK method (for horizontal blocks) is
used most often, but a second method COLUMNAR BLOCK (for vertical blocks)
is also supported.  With this alternate method, you can select any
rectangular area in the document to copy or cut, and then paste.  You can
use it to shift text horizontally, format your text into multiple columns,
move diagrams around, etc.


10.3.1  Shifting Text Horizontally

     It is often helpful to move a piece of text to a different horizontal
or vertical position.  For example, say we want to move a diagram or a
table to a different area on the screen.  We would select one corner of the
area to be moved (the diagram) using MARK COLUMNAR BLOCK and then move the
cursor to the opposite corner of the rectangular section to be moved.  We
then CUT BLOCK to remove the area from its original location into the block
buffer.  Then we position our cursor to the corner of the area where we
want to insert the area and use INSERT BLOCK to move it into place there.

     Note that vertical block operations are normally done with LAYOUT mode
ON in the FILE SETTINGS menu.  LAYOUT mode means that you can move the
cursor anywhere on the screen, even beyond the EOL character (beyond the
physical ends of lines).  This allows you to go far enough over to the
right to mark the columnar block, even though the line you are on may not
extend that far.  Having CygnusEd Professional in LAYOUT mode also ensures
that the diagram will be padded on the left with spaces where necessary to
keep all the lines of the block neatly lined up.  If you are not in LAYOUT
mode when you insert a columnar block then the individual lines will be
tacked onto the ends of the lines already there.

10.3.2  Making Multi-Column Text Files

     You might want to format some text into multiple columns.  This
format, used in newspapers and most other printed media, is available in
limited form in CygnusEd Professional by using the COLUMNAR BLOCK commands.

                                  Page 78

----------------------------------------------------------------------------



     For example, let us say that we have two paragraphs which we want side
by side in columns, format-filled (left- and right- justified) to 36
characters wide each, with a four character space between the two columns.
Here is the method to do this:

     First, make sure LAYOUT mode is on, then set the right border to
column 36.  Then use the FORMAT WITH FILL (AMIGA-f)  command to reformat
each paragraph.  Now you have both paragraphs format-filled as 36
character-wide columns - but they are still end-to-end in the same column.

     Next, use the MARK COLUMNAR BLOCK to mark the beginning of the second
paragraph and go to the end of the paragraph and select CUT BLOCK.  Be sure
that you go far enough to the right to mark the entire paragraph.  This
will move the block out of the document and into CygnusEd Professional's
buffer.

     Lastly, move the cursor to the first line of the first paragraph, but
go to column 40.  This is the corner at which you want to paste the other
column, so select PASTE BLOCK.

     You now have two paragraphs side by side in 36 character columns,
format-filled with a four character gap between them!

     Note:  As you can see, this method is useful only when the text you
have written is not likely to require changing later, since CygnusEd
Professional does not think of columnar text as such.  Moving the text this
way should be the last change you make to your document.


10.4  Converting Tabs And Spaces With Print Functions

     CygnusEd Professional provides the ability to convert tabs to spaces
and vice versa.

     To convert a file or a paste block, you use the Print commands in the
PROJECT menu.  When you have specified where the output will go (i.e., the
printer PRT: device, or a file name), CygnusEd Professional will ask you if
you want to convert from TABS to SPACES or from SPACES to TABS.

     For example, you are working on an assembly language program and use
irregular tabs stops ( a tab stop for instruction, parameter, comments).
If you "type" this file to the printer device then it will not be printed
properly, since the printer device and your printer think of tabstops as
being placed at regular intervals.  If you want to print this file out to
your printer, select TABS to SPACES after selecting print file an deselecting
the output file (or PRT:).  This will automatically replace all existing
tab characters with the appropriate number of spaces - so your printer
doesn't need to be programmed with your peculiar tab settings.

                                  Page 79

----------------------------------------------------------------------------



     Another important use of this function is if you have a file with tabs
of one size or setting and want to convert it to tabs of another size or
setting, without affecting the position of the text, you can use the TABS
to SPACES output with the old format in effect, then read in the output
file (containing now tabs) and change to the new TAB settings.  YOU can
then PRINT the file again with the SPACES to TABS option - your file looks
the same as it did before, but has the new tab sizes or settings.

     For another example, a use who has written a document with the ED
screen editor (provided with WorkBench) wants to convert to actual tabs of
length 3.  He would use the SPACES to TABS setting on the PRINT options to
automatically entab the file.

                                  Page 80

----------------------------------------------------------------------------

