                     STedi : by J.Vermaseren,1987
            Help file for X-windows UNIX version 3.0 (1999)
           Leave this help mode by pressing <shift>F12 again.
      Open a fold with F7 (Function key 7) or all folds with <shift>F7
---#[ Function keys :

F1      Put mark.                    <shift>F1     Delete mark.
F2      Exchange cursor & mark.      <shift>F2     Go to mark.
F3      Cut/Yank.                    <shift>F3     Cut in block mode.
F4      Copy.                        <shift>F4     Copy in block mode.
F5      Paste.                       <shift>F5     Paste in block mode.
F6      Close fold.                  <shift>F6     Close all folds.
F7      Open fold.                   <shift>F7     Open all folds.
F8      Read file.                   <shift>F8     Write file.
F9      Save file.                   <shift>F9     Clear buffer.
F0      Save + Exit.                 <shift>F0     Exit

---#] Function keys : 
---#[ Cursor movement :

        <shift>F12      Gets this helpfile(or go back).
        F11             Undo last series of deletes.
        <home>          Home: Reset to begin of file
        <end>           Go to end of file.
        <not available> Top of screen.
        <not available> Bottom of screen.

<up>    Cursor up                       <PageUp>       One page back.
<down>  Cursor down                     <PageDn>       One page forward.
<right> Cursor right                    <shift><right> Cursor to end of line.
<left>  Cursor left                     <shift><left>  Cursor to column 1.
<up>,<down>  In command line : go through command history.

---#] Cursor movement : 
---#[ Special action :      Delete, Insert etc.

        <Insert>        Insert a new line
        <shift><Insert> New line after current line.
        <delete>        Delete one character (forward).
        <ctrl>delete    Delete current line.
        <backsp>        Backspace one character

        <esc>   Go to command mode.
                In command mode : escape character.

        <ctrl>C          Interrupt for the replay of a learned sequence or
                        macro/stream or searching with a regular expression.

---#] Special action : 
---#[ Alternate keys :      Mostly settings

<alt>A   Write Atari mode                <alt>P   Write printer mode
<alt>B   Toggle backup mode.             <alt>Q   Rewrap+Outline paragrapgh
<alt>C   Toggle screen color.            <alt>R   Read/Write in Raw mode.
<alt>D   Toggle search direction         <alt>S   Set case sensitive.
<alt>E   Toggle search direction         <alt>T   Show tabs and blanks.
<alt>F   Flip to other window            <alt>U   Write UNIX mode.
<alt>H   Flip hex representation         <alt>V   Set to view-only mode.
<alt>I   Set insert mode                 <alt>W   Rewrap paragraph.
<alt>L   List name of file.              <alt>X   Display version date.
<alt>M   Display last message.           <alt>Y   Toggle yank buffer.
<alt>N   Set case nonsensitive.          <alt>Z   Toggle yank buffer.
<alt>O   Set overstrike mode.
<alt>=   Find matching parenthesis ( German keyboard also PF1-' ).
<alt>i   i=1...8 Go to buffer i, i=9,0   Go to YANK or yank buffer.

Also alt-<char> in commandline.

---#] Alternate keys : 
---#[ Control keys :

<ctrl>A  Find same word.                  <ctrl>Q   Previous word.
<ctrl>B  Repeat last <ctrl>A search       <ctrl>R  Repeat previous command.
<ctrl>D  Delete to end of line.           <ctrl>T  Twiddle previous chars.
<ctrl>E  Exchange current line and next.  <ctrl>U  Convert to upper case.
<ctrl>F  Flip case of current char.       <ctrl>V  Unset view-only mode.
<ctrl>H  Hex or Raw input (1 char)        <ctrl>W  Next word.
<ctrl>J  Enter raw keycode (hex).         <ctrl>X  Delete word forward.
<ctrl>K  Enter internal keycode (hex).    <ctrl>Y  Delete word backward.
<ctrl>L  Convert range to lower case.     <ctrl>Z  Delete word backward.
<ctrl>i  i=1...0  Replay learn sequence i or stop learning in it.
<ctrl>-  Put current date in text.

Also ctrl-char in commandline.

Extra Ctrl under UNIX (without X-windows):
<ctrl>F  Page forward
<ctrl>B  Page backward
<ctrl>K  Begin of line
<ctrl>L  End of line
<ctrl>C  interrupt macro or replay of learn sequence
<ctrl>Z  interrupt editor temporarily

---#] Control keys : 
---#[ Tags :

        PF3-PF4-i    i=1...0  Go to tag i (if it can be located).
        (not yet set under X-windows. Use commandline)

        For setting see the < command line command.

---#] Tags : 
---#[ Command Line :        Part1: Searching/replacing

      /string/ or /string     Search for string.

      /string1/=/string2/     Replace string1 by string2
                              according to <®ß¯> settings.

      Escape sequence : enter <escape> plus character or 2 char hexcode.

      Options:  B Search/Replace only inside a block between mark and cursor.
                R Search/replace only in range between mark and cursor.
                V Ask for confirmation in a replace. (veto)
                W Interprete searchstring as a word. Match as word.
                N/S Case sensitive or non-sensitive ( overwrites status line )
                < << 0 >> > as in the status line but overwrites its settings.
                . Stop stream/learnreplay if search unsuccessful.
                [col1,col2] from column1 to column2 (inclusive).
                [,col] and [col,] : from begin resp. to end.

      //regular expression[/] Search for pattern indicated by the expression.

      Special characters in the search string:

        ^       Start of line           $       end of line
        []      group                   {m,n}   at least m, at most n times
        |       or                      %       if followed by
        .       wildcard character      ?       Previous object 0 or 1 times
        *       previous obj 0 or more  +       previous obj once or more
        "...."  Take string litterally
        \ or <esc>      escape character
        <esc><return>   linefeed        ()      used for grouping
        @#      variable number # (object left of it).
        #       wildcard digit          &       Wildcard alphabetic character
        !       Wildcard char in word   ~       wildcard aphanumeric character
        !^      wildcard char not in word.

      //regular expression/=/replacement/    Replacement.

      Special characters in the replacement string

        &       Stands for whole lefthand side
        @#      is variable number #.
                Options Are the same as for normal searching/replacing

      =/string/options   is   /current word/=/string/W+options

---#] Command Line : 
---#[ Command Line :        Part2: Cursor movement

Commands in the commandline are :       ( # stands for any number )
#,i     Go to line #, column i.
 ,i --> Go to column in same line,
 ,,i -> Go to byte number i in the buffer.

+#      Go to current line plus #
-#      Go to current line minus #
=       Shows position of the cursor.

---#] Command Line : 
---#[ Command Line :        Part3: File manipulations.

        Default file:

DR      Read default file               Other D commands in manual :
DW      Write default file              ( DI,DL,DS,DE )
DD      Give default directory.         DD path  Define the default directory.

P       Print file : P : just print, PF : print with pagenumbers.
        PP : Show lines per printerpage, PP# Set # lines per printerpage.
        PP#1,#2 --> #1 lines per page, #2 columns offset.
        P=PRN: or P=AUX: sets printing device. P= shows printing device.

Q       Quit ( same as sh-F10 ).

R[eadFile:]     R'name or R name. either ' or blank is essential.
                R'name < # or R name < #. Read but skip the first # bytes.

S       Save ( same as F9 ).
SQ      Save + quit ( same as F10 ).

W[riteFile:]    W'name or W name. either ' or blank is essential.
W[riteFile:]>   W>'name or W> name. Append to file

---#] Command Line : 
---#[ Command Line :        Part4: Split window.

        F       Go back to single window
        F+# F-# Move split # lines/columns
        FH(#)   Make horizontal split (at #)

---#] Command Line : 
---#[ Command Line :        Part5: Word commands

Auto-indent :   A : Show setting.       A+ : on.        A- : off.
                A# : Fixed to column #, A#+ : at least to #.

Wordwrap :      WW : Show setting.      WW- : off.
                WW# : After column #.   WWF : Fortran mode.

---#] Command Line : 
---#[ Command Line :        Part6: Fold commands

        [       Open  fold
            [A : all.
            ['Name' : By name.
            [# : with line #.
            [ : current.
        ]       Close fold
            ]A : all.
            ]'Name' : By name.
            ]# : with line #.
            ] : current.

---#] Command Line : 
---#[ Command Line :        Part7: Various commands

        first pattern   An initiation of a file search. Successive calls
                to $nextfile make the information about the various files
                available.
        I#      Input commands from buffer # ( = stream input )

        K name  Load keyboard redefinition file (also K=name or K'name)
        K0      Remove keyboard redefinition.

        L#      Start learn sequence for buffer # ( one digit ).

        O         Sort (=order) whole buffer
        O#1,#2    Use in each line char #1 to char #2 as key in sorting
        O:#1,#2   Use in each line column #1 to column #2 as key in sorting
        OF#<char> Use field #. <char> is fieldseparator (def = ,).
        OFN#<char> Same but try to interpret the field as a number.
                If OR instead of O sorting is only inside range of action.
                If < after O sorting is backwards.

        pause <number>  pause the given number of deciseconds (tenth of seconds)

        U       Refresh screen
        U-      Don't refresh screen (for learnsequences,
                streams and keyredefinitions).

        ~<char> Same as Alt-<char>              ^<char> Same as Ctrl-<char>

        'chars  Switch to the next buffer whose name starts with chars.

        ?<drive>        Free bytes on <drive> ( indicated by single character ).

        <#      Place tag number # at current position.
        >#      Go to tag number #. Same as Shift-Ctrl-#.

        :keycode    Execute the key of which the keycode is given in
                    hexadecimal (as obtained with Ctrl-K + key).
                    No use of keyredefinitions yet.

---#] Command Line : 
---#[ Command Line :        Part8: Call to shell.

!program [tail] Execute external program.
!+... !-...     Same as ! commands but forces with/without waiting.
For setting the waitflag, see Settings.

---#] Command Line : 
---#[ Command Line :        Part9: Tabs and spaces.

T {number[*number]} Set tabs.           TG {number[*number]}  in all buffers
TE[R][F]            Expand tabs.                    R: range only
TAB[R][F]           Replace blanks by tabs.         F: also in fold lines
TT[R][F]            Trim trailing blanks and tabs.          (open folds)

---#] Command Line : 
---#[ Command Line :        Part10:Commands by word (mainly for macro's/stream)

    after       = shift-insert            garbage     = force garbage collection
    alt-<char>  = same as <alt>-<char>    gotomark    = goto mark (sh-F2)
    backspace   = backspace               home        = home
    bcopy       = block copy (sh-F4)      insert      = insert
    bcut        = block cut (sh-F3)       left        = cursor left
    bpaste      = block paste (sh-F5)     mark        = place mark (F1)
    clear       = clear buffer (sh-F9)    message str = put str in message line
    copy        = copy (F4)               next        = shift-control-right
    ctrl-<char> = same as <ctrl>-<char>   paste       = paste (F5)
    ctrl-down   = move screen one up      previous    = shift-control-left
    ctrl-home   = go to left up on screen quit        = quit (sh-F10)
    ctrl-left   = scroll left             right       = cursor right
    ctrl-right  = scroll right            save        = save buffer (F9)
    ctrl-up     = move screen one down    savequit    = save+quit (F10)
    cut         = cut (F3)                sh-ctrl-home= go to bottom screen
    delete      = delete                  sh-home     = shift-home
    deleteline  = control-delete          sh-insert   = shift-insert
    delmark     = delete mark (sh-F1)     sh-left     = shift-left
    down        = cursor down             sh-right    = shift-right
    end         = shift-home              up          = cursor up
    exchange    = cursor <--> mark (F2)
"string"        Insert string in text.
                Newlines can be generated with either of:
                \n, \r, <esc>n, <esc>r, <return>, <linefeed>
                \ or <esc> serve as escape character for all other chars.
                A \ should be typed as \\.

---#] Command Line :  Mainly for stream. 
---#[ Macro's :             Command language.

    Invoke:     X macro arguments.

    mc name     copy current buffer as macro with given name
    md name     remove the given macro from memory
    mv          make a list of all loaded macro's in the current buffer (view).
    mv name     If macro name is loaded: copy into current buffer.

Statements:
    set variable = expression
    while expression
    endwhile
    if expression
    else
    endif
    goto NameOfLabel
    label NameOfLabel
    return returncode
All other statements are passed to the command line processor after
substitution of the preprocessor variables. The set command can be issued
from the command line. The others cannot.
Lines with as first non-blank character a * or # are commentary.
Variables used in rhs as $name or ${name}. Up to 10 characters in name.
$0 is name of macro, $1 - $9 are the arguments.
$@1 - $@9, $@& are regular expression variables if there was a search
(no replace!) just before.
label onerror is a special label for error recovery (only once per macro).

Reserved names (can only be used, not defined):

buffer      number of current buffer   nextdate    date/time of last nextfile
byte        bytes before cursor        nextfile    is next file in search?
char        the char under the cursor  nextfname   path+name of last nextfile
column      current column             nextname    name of last nextfile
cwd         the current directory      nextsize    size of last nextfile
date        the date                   numchar     chars left of cursor
direction   search/replace dir. mode   range       string between mark/cursor
filename    name of file in buffer     returncode  set at end of each macro
fold        name of current fold       screenline   Screenline of the cursor
fullname    name of file incl. path    searchmode  'N' or 'S'         \column
insertmode  'I' or 'O'                 shell        Is there a shell?
isfold      '1' if in foldline.        totlines    lines in buffer
ismark      ON/OFF depending on mark   value       value previous command
key         gets one key Ctrl-K style  word        the current word
lastmess    last error message         wordwrap    the wordwrap column
line        number of current line     writemode   'A','P','R' or 'U'
linechars   characters in line         wword       current `wordwrap' word
maxcol      column at end of line      yankbuf     'Y' or 'y'
nextatt     attribute of last nextfile

other protected names (can be set):
autoclose   backup   bios   color   dirty   hstep   maxhist   menuspaced
mstep   mversion   numbers   pagedelay    waitflag    <char>   (see settings)
mouse menu items can only be set: set {number} = "char" in which the number
must be between curly brackets.
Undefined names are looked for in the environment (case insensitive).

Expressions have operators:
    !           Unary logical not
    *  /  %     Multiplication, division remainder
    +  -        Addition(or string concatenation) and subtraction
    :>  <:      Remove characters from left/right
    =^  ^=      Remove characters to and including substring from left/right
    <<  >>      Shorten string to given number of chars. Leave left/right part.
    ~  //       String concatenation
    !=  ==      Not equal, equal to be compared as strings.
    > < >= <=   Greater than, less than, greater or equal, less or equal
    >~ <~ >=~ <=~   Same but forced to be lexicographic.
    &&          Logical and
    ||          Logical or
    strlen      Length of the string following this operator
    toupper     Convert to upper case
    tolower     Convert to lower case

    values are decimal numbers (true = '1', false = '0') or strings enclosed
    in "" or a string of characters starting with a-zA-Z and running to the
    next nonword character and not an operator.

    Stop execution with <shift><shift>.
    The . option in searching can halt the deepest macro but continue
    the execution of the macro that called it.

    The special macro command
		input name = prompt
    will put the prompt in the commandline and let the user type a string.
    The string typed is put in the local variable `name'.

---#] Macro's : 
---#[ Command Line :        Part11: Settings

Special variables that can be set with the `set' command:
        autoclose = on/off      Writing/reading remembers closure of folds
        backup = V,B,b or `no backup' char
        bios = on/off           (Atari only) Do screen handling via bios (=on)
                                or via own routines (=off).
                                Color is done mostly by the bios.
        color = on/off          Determines color toggle text <--> commandline
        dirty = on/off          Set dirtyflag on or off.
        hstep = number          The horizontal scroll step size in columns
        maxhist = number        The maximum number of lines in the
                                command line history.
        menuspaced = on/off     Determined whether only every other position
                                in the menubar is sensitive to clicks.
        mstep = number          scroll step size in the command/message line.
        mversion = number       The version of the mouse menu.
        numbers = on/off        Line numbers will/won't be displayed
        pagedelay = number      Screen drawing will take at least # milliseconds
        waitflag = on/off       Waiting after ! command
        <a> = on/single/off     determines whether a is seen as a character
                                in a word, as a single character or whether
                                word commands are refused.
                                Any other character can be used instead of
                                the a.

Contents of a variable can be made visible with the command:
        show variable

---#] Command Line : 
---#[ Starting up options :

Calling statement:
        ce [ -d pathname] [ [-r] filename[s] ] [ -i macroname [arguments] ]
        The -d (or -D) argument sets the default path for the default file,
                the help file, and the macro files
        The -r argument makes that the file is read in raw mode.
        The -<linenumber> argument makes that the file that follows will be
                positioned at the given linenumber
        The -i or -x argument causes the next argument to be interpreted as
                the name of a macro (the .mac extention will be added if the
                macro is not in memory). All arguments after the name of the
                macro are passed as arguments to the macro. The macro is
                executed, buffer 1 is saved and execution stopped.
        The -v argument puts the following file in view only mode.
        The +<bytenumber> argument skips the first <bytenumber> bytes in
                the file.

The following environment variables are recognised (case insensitive!):
    stedidft    default path for default file.
    stedihlp    default path for help file.
    stedimac    default path for macro files.
    All undefined variables are looked for in the environment!
The -d flag overwrites all the environmental defaults.
Files in the current directory have always priority (more project oriented).

---#] Starting up options : 

