@reference-begin
Edit-Mode
*********

   This  mode  is  marked  with  Edit  or  E  in  the  statusline.  Its   the
   standard-mode for editing and activated at startuptime.

   Moving around:
   **************

         backward-character:           escape l e  |  C-S
                                       R10  |  dos-left  |  left
            Move the cursor one character to the left on current line. Do not
            go to previous line when reaching the start of the line.

         backward-word:                escape l w  |  C-A
                                       R13 R10  |  dos-ins dos-left
            Move one word to the left and skip lines, if needed. In  extended
            mode, quotes and fences are handled too, if  language  c,p,o,i or
            tex are choosen.

         beginning-of-line:            escape s l  |  C-Q C-S
                                       R7
            Move to first non-space character on line.

         forward-character :           scape r i  |  C-D
                                       R12  |  dos-right  |  right
            Move one character to the right and don't go to the next line  at
            end of line.

         forward-word:                 escape r w  |  C-F
                                       R13 R12  |  dos-ins dos-right
            Go word (or expression in c..) to the right (like backward-word).

         end-of-line:                  escape e l  |  C-Q C-D
                                       R9
            Move to last character on line.

         previous-line:                escape u p  |  C-E
                                       R8  |  dos-up  |  up
            Go to the previous line on the  screen.  If  file-based  mode  is
            active, folds  will  be  opend  to reach the previous line in the
            file.

         previous-page-:               escape p u
                                       R13 R1
            Move one screen up.

         mtool-top:                    escape s f  |  C-Q C-E
                                       R13 R8  |  dos-ins dos-up
            Move to the start-fold-comment  of  the  currently  opened  fold.
            Don't open or close any folds.

         beginning-of-fold:            escape s F
                                       R1
            Go to begin-fold-comment of currently entered fold. Don't open or
            close any folds.

         next-line:                    escape d n  |  C-X
                                       R14  |  dos-down  |  down
            Go to the next line on the screen. If file-based mode is  active,
            folds will be opend to reach the next line in the file.

         next-page:                    escape p d
                                       R13 R3
            Move on screen down.

         mtool-bot:                    escape b o  |  C-Q C-X
                                       R13 R14  |  dos-ins dos-down
            Go to the bottom of currently opened fold. Don't  open  or  close
            any folds.

         end-of-fold:                  escape b O
                                       R3
            Go to end-fold-comment of currently entered fold. Don't  open  or
            close any folds.

         goto-line:                    escape g o  |  C-Q g
                                       R13 g  |  dos-ins g  |  f2 g  |  EF2 g
            Origami prompts for a line-number and goes to it. All  Folds  are
            closed, except the ones, needed to reach the line.

         goto-matching-fence:          escape ]
            Origami tries to find the matching character for {,},[,],( or  ),
            if the cursor stands on one of them.

         search-forward:               escape f i
            Origami prompts for a pattern and moves to next occurance. Giving
            a empty search pattern will look for the  last  searched  pattern
            again.

         search-reverse:               escape f r
            Origami prompts for a pattern and moves to last occurance. Giving
            a empty search pattern will look for the  last  searched  pattern
            again.

         incremental-search-forward:   escape i s  |  C-Q f
                                       R13 f  |  dos-ins f  |  f2 f  |  EF2 f
            Start  the  incremantal-search-function.  Origami   prompts   for
            characters and moves to the next matching position. The following
            actions are supported:
              up/down:
                 look for last/next occurance. If this  is  the  first  input
                 after  starting  incremental-search-forward, the last  given
                 pattern is used.
              deleteprevious-character:
                 remove the last character from the pattern  and  go  to  the
                 position, this character was added to the pattern.
              any character:
                 add it to the pattern and look for next/previous occurance.


   Editing
   *******

         newline-and-indent:           return
            Opens the current line at cursor-position. If mode auto-indent is
            active, the new line gets same indentation as the old.

         go-to-next-tab:               escape g t
                                       tab
            Moves the cursor to the next tabulator position.  Though  Origami
            doesn't support tab-charachters,  you  can  use  this function to
            jump  at  the  correct  position.  The tab-width is set to  given
            tab-width, if there were tabs in  the  file  or  to  the  correct
            values for  my  personal  programming- style, if one of languages
            c,p or t are active (see below). Otherwise it's set to 8.

         define-tab:                   escape d t
                                       escape tab
            Prompt for the new tab-width.

         quote-character:              C-V
            The next character from input will be used directly. If you  have
            bound it to a macro this binding will be ignored.

         delete-previous-character-:   escape b s
                                       backspace
            Delete the character left from the cursor. Maybe join the current
            line and the previous line.  If  this  is  used  in  front  of  a
            open-fold-line, the  complete fold will be moved one character to
            the left.

         append-to-previous-line:      escape j o
                                       escape backspace
            Join the curent and the previous line.

         delete-character-:            escape d c  |  C-G
                                       delete
            Delete the character under the cursor. Maybe join the current and
            the next line. If this is used in front of a open-fold-line,  the
            complete fold will be moved one character to the left.

         delspaces:                    escape d s
                                       escape delete
            Delete all  spaces  from  cursorposition  to  next  non-space  or
            end-of-line.

         delete-to-end-of-line:        escape d e
            Delete all characters on the current line from cursor-position to
            end.

         undo-delete-character:        escape u c
            Put the last deleted character at cursor-position in the text.

         transpose-character:          C-T
            Transpose the current and the character  left  from  the  cursor.
            Move one step to the right.

         delete-line:                  escape d l  |  C-L
                                       R13 R9  |  dos-ins dos-end
           Delete the current line.

         undo-delete-line:             escape u l  |  C-Q C-L
                                       R13 R7
            Put the last deleted line at cursor- position into the text. This
            can only be done for one line!

         query-replace-string:         escape r p  |  C-Q r
                                       R13 r  |  dos-ins r  |  f2 r  |  EF2 r
            Prompt for search and replace-pattern and replace them  (ask  for
            permission).

         wrap-word-:                   space
            Add a space at current position. If wrap-mode is active, a  space
            at end of line maybe breaks that line, if it get's to long. Using
            this in front of a open-fold-line  moves  the  complete  fold  on
            space to the right.


      The following inputs will generate  more  than  themself,  if  used  in
      extended mode:

         `(' in languages C PASCAL  OCCAM  INMOS  TEX,  the  string  `()'  is
             generated and the cursor is moved to the `)' (`[' analogue)

         `{' in language C or PASCAL, a block is put at the  right  position:
            OCCAM:
               SEQ
                 foo1
                 SEQ
                   foo2
            C:
               main (...)
               { char foo;

                 if (argc)
                  { foo='m';
                  }
               }
            PASCAL:
               procedure main(int argc);
                 begin
                   if (argc>0) then
                     begin
                       foo:='m';
                     end;
                 end;

         `"' in language C PASCAL OCCAM INMOS, the string `""'  is  generated
             and the cursor is moved to the second `"' (`'' anlogue).

         `;' in languages C PASCAL, the statement-delemiter `;'  is generated
             at end-of-line (if needed). The cursor  is  moved  to  the  next
             line.


   Folding
   *******

         open-fold:                    escape o p  |  C-W
                                       R4  |  dos-home  |  f3  |  EF3
            Open the closed fold under the  cursor.  Filed  folds  cannot  be
            opened.

         enter-fold:                   escape e n  |  C-Q C-W
                                       R13 R4  |  dos-ins dos-home  |
                                       f2 f3  |  EF2 EF3
            Enter the fold under the cursor. If there is a  normal  textline,
            Origami tries to  open  the  file,  named  like  the current word
            (starting at cursorposition, ending at single-quote, double-quote
            or  space).  In  extended mode and language C, Origami  tries  to
            reach the correct #include filename.

         close-fold:                   escape c l  |  C-R
                                       R6  |  dos-prev-page  |  f4  |  EF4
            Close the opened fold the cursor is in.

         exit fold:                    escape e x  |  C-Q C-R
                                       R13 R6 | dos-ins dos-prev-page |
                                       f2 f4  |  EF2 EF4
            Exit the currently entered fold.

         auto-header:                  escape a h
            The fold-comment is set to the text of  the  first  line  in  the
            fold.

         create-fold:                  escape c r
                                       R15  |  dos-next-page
            Use the first time, to mark the beginning  of  a  new  fold.  The
            second use marks the end of  a  new  fold,  which will be created
            then.  If  the  extended  mode  is active,  Origami  switches  to
            Move-Mode using this function.

         unfold-fold:                  esc r e
                                       R13 R15  |  dos-ins dos-next-page
            Remove the fold arround the lines in the current foldline.

         toggle-file-fold:             escape f f
                                       R13 R11
            If the current line is a filed-fold, the  file  is  included,  so
            that the fold is a normal text-fold.  Otherwise Origami creates a
            file (filename is  the  fold-comment)  containing the contents of
            the  fold.  The  current line is replace by a filed-fold for this
            file.

         attach-file-to-fold:          escape a t
            If the cursor stands on a empty and closed fold, Origami tries to
            link a file to this fold. On success you have a filed-fold, named
            like the fold-comment.

         set-language:                 escape l a  |  C-Q l
                                       R13 l  |  dos-ins l  |  f2 l  |  EF2 l
           Change the patterns to hide fold-comments. If the extended mode is
           activ,   this   will   also   change   the   behaviour   of    the
           language-dependent commands.


   Line handling
   *************

        double-line:                   esc c o  |  C-O
                                       R13 R5
            A copy of the current line will be put into the text.  Folds  can
            be copied too.

         move-line:                    escape m o  |  C-Q C-O
                                       R13 R2
            If  the  move-buffer  is  empty,  move  current  line  into   the
            move-buffer. Otherwise the move-buffer is moved into the  text.

         kill-line:                    escape p i  |  C-K
                                       R2
            Kills the current line and appends it  to  the  kill-buffer.  For
            historical reasons  the  TDS/Multitool-name `PICK'-buffer is used
            for the escape-keysequences.

         copy-to-kill-buffer:          escape c p  |  C-Q C-K
                                       R5
            Puts a copy of the curent line at the end of the kill-buffer.

         insert-folded-kill-buffer:    escape p p  |  C-P
                                       R11
            If the kill-buffer isn't empty, Origami puts all  'killed'  lines
            in a new fold into the text.


   Files
   *****

         insert-file-:                 escape i n  |  C-Q i
                                       R13 i  |  dos-ins i  |  f2 i  |  EF2 i
            Prompts  for  a  file,  which  should  be  included  at   current
            cursorposition.

         read-file-:                   escape o f  |  C-Q o
                                       R13 o  |  dos-ins o  |  f2 o  |  EF2 o
            Prompts for the next file to be edited. If the  current  one  was
            changed, Origami ask for  permission  to  change  the  file.  The
            commands  previous-file/next-file are disabled after  using  this
            function.

         save-file-:                   escape s a  |  C-Q s
                                       R13 s  |  dos-ins s  |  f2 s  |  EF2 s
            Saves the current file. If  buffer-save  mode  is  activ,  kill-,
            delete and move-buffer are stored to file $HOME/.origamibuf.

         save-file-with-leading-tabs:  escape s t
            Save the current file und run unexpand -a.

         write-file-:                  escape w f  |  C-Q w
                                       R13 w  |  dos-ins w  |  f2 w  |  EF2 w
            Prompts for a filename and write the current text to  this  file.
            If not using folding-language TDS, Origami prompts,  whether fold
            marks should be written or not.

         previous-file:                escape p f
            Switch to previous file, given on command line.

         next-file:                    escape n f
            Switch to the next file given on command line.


   Helps
   *****

         center-and-redraw-display:    escape r f  |  C-Q C-Q
                                       R13 R13  |  dos-ins dos-ins  |
                                       f2 f2  |  EF2 EF2
            Refresh the screen and show the current line  in  the  middle  of
            your display.

         describe-fold:                escape f ?  |  C-Q ?
            Show some information:
               line,
               column,
               entered folds,
               entered spaces
            If the cursor stands on a foldline, additional information  about
            foldtype/-contents (in TDS-coding) is given.

         help:                         escape h e  |  C-Q h
                                       R13 h  |  dos-ins h  |  f2 h  |  EF2 h
            Show the file .origamihelp. You can put anything  you  want  into
            this textfile.

         describe-bindings:            escape h b
                                       R13 ?  |  dos-ins ?
            Show the mapping of the current keyboard-mode.

         file-menu:
                                       f1  |  EF1
            Show a menu under the statusline. You can choose (by moving  with
            left/right and return or the first letter):
               describe-bindings
               help
               save-file
               read-file
               insert-file
            Pressing f1 twice will display the binding-list.


   Exits
   *****

         exit-origami-:                escape q u  |   C-Q q
                                       R13 q  |  dos-ins q  |  f2 q  |  EF2 q
            This functions leaves Origami. If the current file  was  changed,
            Origami prompts for permission to leave.  If  buffer-save mode is
            activ,  kill-,  delete  and   move-buffer   are  stored  to  file
            $HOME/.origamibuf.

         save-and-exit-origami-:       escape s e  |  C-K C-D
            This Command leaves Origami. If needed, the current file will  be
            saved.  If  buffer-save  mode  is  activ,   kill-,   delete   and
            move-buffer are stored to file $HOME/.origamibuf.


   Macros
   ******

         define-macro:                 escape d m  |  C-Q d m
                                       R13 d m  |  dos-ins d m
            Start or stop the storing of keyboardinputs in keyboardmacro.

         execute-macro:                escape c m  |  C-Q m
                                       R13 m  |  dos-ins m
            Call keyboard macro.


         user-macro-x,x=0..9:          escape m x
            Call the user macro x.


         def-user-macro:               escape d u
            Prompt for a user macro and save the keyboard macro to it.


   Shell
   *****

         shell:                        escape s h
            Origami will start a shell for you. Exiting the shell will  start
            Origami again.

         shell-command:                escape s c
            Origami prompts  for  a  shell  command.  This  command  will  be
            executed.

         suspend-origami:              escape s u  |  C-Z
            Origami stops and you are back in your shell.

         filter-buffer:                escape f b
            Origami prompts for a filter and pipes the current  text  through
            it. Files in language Inmos cannot be filter.

         pipe-from-command:            escape < p
            Prompt for a command and add the output of this  command  to  the
            text.

         pipe-to-command:              escape > p
            Prompt for a command and run it with current text as input.

         pipe-kbd-from-command:        escape p k
            Prompt for a command and use its  output  as  keyboard-input  for
            Origami.


   Advanced Commands
   *****************

         dumb-buffers-to-file          escape > b
            Saves kill-, move- and delete-buffer to  file  $HOME/.origamibuf.
            The buffers are not  changed  by  this  command. The file will be
            saved.


         get-buffers-from-file         escape > b
            Get kill-, move- and delete-buffer from  file  $HOME/.origamibuf.
            The file will be saved.


         menu-start:                   escape @ a
         menu-again:                   escape ? a
         menu-previous:                escape < a
         menu-previous-page:           escape { a
         menu-next:                    escape > a
         menu-next-page:               escape } a
         menu-end:                     escape $ a
         call-make:                    escape m a
         call-make-error:              escape g e
            These commands handle the display  of  the  file  $ORIAREA  in  a
            special window below the text. When starting the display, Origami
            asks for the  number  of  lines,  used for this window. call-make
            envokes make and displayes the output in the menu-window.

         get-x-selection:              escape g s
            Paste the x-selection befor current line into the text.

         fill-paragraph:               escape s space
         inv-blank-handle:             escape s m
         set-fill-column:              escape s .
            fill-paragraph beautifies normal text. You can choose one of  the
            following modes:
               roff/tex/ragged/block
            inv-blank-handle toggles between these modes.
            set-fill-column sets the right margin of the blocks. The value is
            given by:
                  set-argument
               or
                  current-position (if behind column 20)
               or
                  keyboard-input

         ansi-to-kr:                   escape k r
            Convert a ANSI-C header to a KR-C header.

         ifdef-ansi-to-kr:             escape i k
            Like ansi-to-kr with #ifdef STD_C.

         set-argument-x:               escape x                      (x=0..9)
                                       R13 x                         (x=0..9)
            All numberinputs will be appended to x and the following  command
            will be repeated according to x.

         lookup:                       escape l o
            The word under the cursor is searched in all files in the current
            directory. If the current language is C  or  PASCAL,  only  files
            ending on .c .h .p are used.


   Modes
   *****

         switch-to-move-mode:          escape escape
            Switches to move-mode and uses current position as start-mark.

         set-file-unchanged:           escape - c
            The status of the current file will be  unchanged,  even  if  you
            have made changes!

         add-mode-autosave:            escape + a
         delete-mode-autosave:         escape - a
            If autosave is active, Origami will save your file in intervalls.
            When active, `AutoSave' or `S' are displayed in the statusline.

         add-mode-echo:                escape + e
         delete-mode-echo:             escape - e
            If echo is on, Origami will show started keysequences  under  the
            statusline.

         add-mode-extended:            escape + x
         delete-mode-extended:         escape - x
            Enables or disables the extended mode.

         add-mode-wrap:                escape + w
         delete-mode-wrap:             escape - w
            If wrap is on, typing space at end of  line  behind  fill-column,
            the current line will be  broken.  When active, `Wrap' or `W' are
            displayed in statusline.

         add-mode-overwrite:           escape + o
         delete-mode-overwrite:        escape - o
            If active, textinput won't be inserted but will overwrite the old
            text. When active, `Over' or `O' are displayed in the statusline.

         add-mode-view:                escape + v
         delete-mode-view:             escape - v
            When active, you cannot change  the  file.  This  mode  displayes
            `View' or `V' in the statusline.

         switch-status-line-on:        escape + s
         switch-status-line-off:       escape - s
            This switches the statusline in edit-mode on or off. In Move-Mode
            the statusline-line will be always displayed.

         add-mode-file-based:          escape + %
         delete-mode-file-based:       escape - %
            Control the effect of up and down movements (next/previous screen
            or file-line). If  this  mode  is  active,  `%'  appears  in  the
            statusline.

        add-mode-auto-indent           escape + i
        delete-mode-auto-indent        escape - i
          Switch auto-indenting on or off. Default is on. This mode is marked
          with `>' in the statusline.


        add-mode-buffer-save           escape + b
        delete-mode-buffer-save        escape - b
          Enables saving the buffers  on  save-file  and  exit.  marked  with
          `BuSa' or `B' in the  statusline. If this mode is activ at startup,
          the buffers are read from file.
@reference-end
