This chapter reviews some of the advanced features which incorporated
into \Slim{}, \Terse{}'s big brother.

\section{Edit Another File}
If while editing one file, you need to edit another files, you can
do so by pressing \Key{Alt-E}. If you have saved all changes to the
buffer, then \Slim{} will prompt you for the name of the file you
wish to edit next. Type in the name of this file and press \Key{Enter}. 
\Slim{} will load this file and you can edit it.

If you haven't saved the buffer since you last changed it, \Slim{} will 
respond to \Key{Alt-E} by the following prompt:

\begin{quote}
\begin{verbatim}
      Lose changes (Y/N)?
\end{verbatim}
\end{quote}

If you press anything but `Y' or `y', \Slim{} will just beep and give
a warning message that the file was not saved. 
If you do press `Y' or `y' then all the changes you have made to the
buffer since you last saved it are lost. You are then prompted for the
name of file you wish to edit next. 



\section{Word wrap}
\Slim{} can do automatic word wrap as you type.  Upon pressing \Key{Alt-M},
\Slim{} prompts you for a right margin:

\begin{quote}
\begin{verbatim}
      Margin:_ 
\end{verbatim}
\end{quote}

Type in your preferred right margin setting (72 is pretty common and
useful selection).  If a right margin is set, then whenever you finish
typing a word (i.e., when you hit a \Key{Space} or \Key{Tab} key) \Slim{} checks
if this margin was exceeded, and if so, the last word typed is wrapped
to the next line.

If the right margin is set to 0, then word wrapping is disabled will
occur.  By default, the right margin is 0. This default can be changed 
with the \Command{sconfig} configuration program.


\section{Swap Cursor and Mark}
An easy way to go to the beginning or the end of a marked block the ``Swap
Cursor and Mark" command.  Upon pressing \Key{Shift-Tab}, the cursor position
is swapped with mark position.


\section{Exchange Marked Block with Paste Buffer}
Many users are familiar with the ``cut, copy and paste'' paradigm 
for manipulating
chunks of texts.  In \Terse{} you block a piece of text by dropping a mark
(\Key{Alt-A} key) at its beginning and then moving the cursor to its end.
You can then \Command{Copy} (\Key{Keypad +} key) 
	the blocked text to a paste buffer,
or \Command{Cut} (\Key{Keypad+} key) it to the paste buffer.  Later, you can move to
a different location and \Command{Paste} the text, i.e., insert the text in the
paste buffer.

\Slim{} adds to these three basic operations yet another one:
``Exchange Marked Block with Paste Buffer", or for short
\Command{Exchange}.  By default, this command is bound to \Key{Keypad*}
key (keypad grey asterisk).  Upon pressing this key, the contents of
the currently marked block is exchanged with the current contents of
the paste buffer.  Hitting \Key{Keypad*} again effectively undoes this
operation.

The \Command{Exchange} operation should come in handy in situations where you
need to shuffle a lot text around.  An important application of this
operation is discussed next.


\section{Pump Block Through Filter}
The term ``filter" is borrowed from UNIX\@.  It refers to a program, which
takes input from the standard input, processes it, and then produces
output to the standard output.  Several filters are supplied with the
full distribution.  For example, the WC filter produces to the standard
output a count of the number of lines, words and characters in the
standard input.

The ``pump block through filter" command, by default bound to the
\Key{Alt-F} key, runs a filter while supplying the currently marked block
as input to the block and capturing the filter's output.  When the
filter finishes, its output will show as the currently marked block.
The previous contents of the marked block are moved to the paste buffer.
By pressing \Key{Keypad*} you can exchange the contents of the block and of
the paste buffer, effectively undoing the filter operation.

Thus, to count the number of words in a document, follow these
easy steps:

      \begin{enumerate}
      \item
         Hit \Key{Ctrl-PgUp} to move to the top of the file.
      \item
         Hit \Key{Alt-A} to drop an anchor.
      \item
         Hit \Key{Ctrl-PgDn} to go to the end of the file. The whole
         file should be marked now.
      \item
         Hit \Key{Alt-F} to invoke the ``pump block through filter" command.
         Upon doing so, \Slim{} prompts you for the name of the filter

\begin{verbatim}
             Filter: _
\end{verbatim}

      \item
         Type in {\tt wc -w} and hit \Key{Enter}. (The {\tt -w} flag tells 
	the command	\Command{WC}	
         to produce word count only)
      \item
         The number of words in the document now shows, while the document
         itself is erased.
      \item
         Hit \Key{Keypad*} to restore the documents contents, and erase the
         word count. Later you can hit \Key{Ins} to paste the word count
         wherever you may need it.

      \end{enumerate}

The full distribution includes also the \Command{nfmt} filter, which
reformats text using smart line breaking algorithm.  All of \Terse{}
documentation was formatted using this filter.  To reformat a piece of
text, I simply mark it (usually the whole paragraph), and invoke the
\Command{nfmt} filter.  Some other filter included with the full
distribution are the DOS equivalents of the some famous UNIX filters:
\Command{expand}, \Command{unexpand}, \Command{uudecode}, and
\Command{cat}.  The \Command{quote} filter is useful in composing
e-mail messages.  The \Command{rot13} filter allows you to decrypt and
encrypt spoilers etc.

Many more new features can be easily added to \Slim{} by virtue of this
command.  A few examples are: date and time stamping, sorting, column
summation, character sets conversions, directory contents listings etc.
Sophisticated users should probably get copy of a DOS port of the famous
UNIX {\tt sed} and {\tt awk} filters, and harness their power to 
enhance \Slim{}.

The ``pump block thru filter" command does not use temporary files,
and can be run with even when the disk is full.  Programmers may enjoy
contemplating how this little wonder was implemented.  (If you really
cannot figure this out, write to me and ask for a clue\ldots)

The ``pump block thru filter" command does captures also the standard
error of the executed filter.  You can thus run your favourite compiler
from within \Slim{}.

\section{Go to Line}
If you use the ``pump block thru filter" to invoke a compiler, you may
find it useful to be able to find a line by its number.  To invoke the
``go to line" command press \Key{Alt-G}.  Upon doing so, \Slim{} presents the
following prompt:

\begin{verbatim}
    Go to line: _
\end{verbatim}

Type in the desired line number and hit \Key{Enter}. 
