home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / bbs / may94 / util / edit / jade.lha / Jade / doc / jade.info-2 (.txt) < prev    next >
GNU Info File  |  1994-04-20  |  45KB  |  906 lines

  1. This is Info file jade.info, produced by Makeinfo-1.55 from the input
  2. file jade.texi.
  3.    This is Edition 1, last updated 19 April 1994, of `The Jade Manual',
  4. for Jade, Version 3.0.
  5.    Jade is a text editor for Unix (with X11) and the Amiga.
  6.    Copyright 1993, 1994 John Harper.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided that
  12. the entire resulting derived work is distributed under the terms of a
  13. permission notice identical to this one.
  14.    This is so that jade doesn't try to eval the example use.
  15. ::jade-code::
  16. ::end::
  17. File: jade.info,  Node: Commands for Searching,  Next: Commands for Replacing,  Prev: Regular Expressions,  Up: Searching and Replacing
  18. Commands for Searching
  19. ----------------------
  20. `Ctrl-s'
  21.      Asks for a regular expression then tries to move to the start of
  22.      the next match in this buffer.
  23. `Ctrl-S'
  24.      Attempts to move to the next occurrence of the regexp which was
  25.      last entered for the `Ctrl-s' or `Ctrl-r' commands.
  26. `Ctrl-r'
  27.      Asks for a regexp, then moves to the start of previous occurrence
  28.      of that regexp.
  29. `Ctrl-R'
  30.      Attempts to move to the previous occurrence of the regexp which
  31.      was last entered for the `Ctrl-s' or `Ctrl-r' commands.
  32. File: jade.info,  Node: Commands for Replacing,  Prev: Commands for Searching,  Up: Searching and Replacing
  33. Commands for Replacing
  34. ----------------------
  35. `ESC p'
  36.      Asks for a template to replace the string under the cursor (which
  37.      should match the regexp which the search commands last looked for.
  38.      This string is then replaced with the expansion (re the string
  39.      under the cursor) of the template you entered.
  40. `ESC P'
  41.      Variant of the above, doesn't prompt for the template, uses the
  42.      last one that you gave.
  43. File: jade.info,  Node: Editing Modes,  Next: Using Buffers,  Prev: Searching and Replacing,  Up: Using Jade
  44. Editing Modes
  45. =============
  46.    Modes are used to tailor the editor to the *type* of the file being
  47. edited in a buffer. They are normally a file of Lisp which installs the
  48. buffer-local keybindings and variables which are needed for that type of
  49. file.
  50.    For example, C-mode is a mode used to edit C source code, its main
  51. function is to try to indent each line to its correct position
  52. automatically.
  53.    At present there are only a small number of modes available. It is
  54. fairly straightforward to write a mode for most types of files though.
  55. * Menu:
  56. * Invoking a Mode::        How editing modes are invoked on a buffer
  57. * Generic-mode::        The foundations which all modes build from
  58. * C-mode::            Mode for C source code
  59. * Lisp-mode::            Mode for Lisp
  60. * Texinfo-mode::        Mode for editing Texinfo source
  61. * Info-mode::            The Info browser
  62. File: jade.info,  Node: Invoking a Mode,  Next: Generic-mode,  Up: Editing Modes
  63. Invoking a Mode
  64. ---------------
  65.    When a new file is loaded the function `init-mode' tries to find the
  66. mode that it should be edited with. If it is successful the mode will be
  67. automatically invoked. For more information see *Note Automatic Mode
  68. Selection:: and the documentation for `init-mode'.
  69. File: jade.info,  Node: Generic-mode,  Next: C-mode,  Prev: Invoking a Mode,  Up: Editing Modes
  70. Generic-mode
  71. ------------
  72.    This is not a mode as such since there is no Lisp code associated
  73. with it.  When no mode is being used to edit the buffer, it is said to
  74. use the "Generic" mode.
  75.    This is the base from which all other modes build, it consists of
  76. all the standard keybindings. Words are defined as one or more
  77. alphanumeric characters, paragraphs are separated by a single blank
  78. line.
  79. File: jade.info,  Node: C-mode,  Next: Lisp-mode,  Prev: Generic-mode,  Up: Editing Modes
  80. C-mode
  81. ------
  82.    `c-mode' is used for editing C source code files. Any files which
  83. end in `.c' or `.h' are automatically edited in this mode.
  84.    It's one and only function is to try and indent lines to their
  85. correct depth, it doesn't always get it right but it works fairly well.
  86. The keys that it rebinds to achieve this are,
  87. `RET'
  88.      Splits the line in two like normal. If `c-mode-auto-indent' is
  89.      non-nil then the line that the cursor ends up on is automatically
  90.      indented.
  91. `Shift-RET'
  92.      Splits the line in two, doesn't take any notice of
  93.      `c-mode-auto-indent'.
  94.      These keys are handled specially since the indentation of the line
  95.      that they are inserted on may have to be adjusted.
  96. `TAB'
  97.      Indents the current line to what the editor thinks is the correct
  98.      position.
  99. `Meta-TAB'
  100.      Moves the cursor to the next tab stop.
  101.    Words are defined as being a sequence of alphanumeric or underscore
  102. characters, paragraphs as being separated by a `{' as the first
  103. character of a line.
  104.  - Function: c-mode
  105.      Editing mode for C source code. Automatically used for files
  106.      ending in `.c' or `.h'.
  107.  - Hook: c-mode-hook
  108.      Called by `c-mode' each time it is called.
  109.  - Variable: c-mode-tab
  110.      Size of tab stops used by `c-mode'.
  111.  - Variable: c-mode-auto-indent
  112.      When non-nil `RET' will indent the line after splitting it.
  113. File: jade.info,  Node: Lisp-mode,  Next: Texinfo-mode,  Prev: C-mode,  Up: Editing Modes
  114. Lisp-mode
  115. ---------
  116.    `lisp-mode' is used to edit files of Lisp intended to be read by the
  117. editor. It is *very* basic, all it does is count the number of unmatched
  118. parentheses in each line and indent it accordingly. I find this okay
  119. though.
  120.    There is also support for using a buffer as a simple shell-interface
  121. to the editor's Lisp subsystem.
  122.    Special keybindings are,
  123. `RET'
  124.      Splits the line in two like normal. If `lisp-mode-auto-indent' is
  125.      non-nil then the line that the cursor ends up on is automatically
  126.      indented.
  127. `Shift-RET'
  128.      Splits the line in two, doesn't take any notice of
  129.      `c-mode-auto-indent'.
  130. `Ctrl-RET'
  131.      Evaluates the paragraph preceding the cursor, prints the value on
  132.      the next line.
  133. `TAB'
  134.      Indents the current line.
  135. `Meta-TAB'
  136.      Moves the cursor to the next tab stop.
  137. `ESC Ctrl-x'
  138.      Evaluates the paragraph before the cursor, prints it's value in
  139.      the status line.
  140.  - Function: lisp-mode
  141.      Editing mode for Jade's Lisp. Automatically invoked for files
  142.      ending in `.jl'.
  143.  - Hook: lisp-mode-hook
  144.      Evaluated as soon as `lisp-mode' is called.
  145.  - Variable: lisp-mode-tab
  146.      Size of tabs in `lisp-mode'.
  147.  - Variable: lisp-mode-auto-indent
  148.      When non-nil `RET' indents lines after splitting them.
  149. File: jade.info,  Node: Texinfo-mode,  Next: Info-mode,  Prev: Lisp-mode,  Up: Editing Modes
  150. Texinfo-mode
  151. ------------
  152.    `texinfo-mode' is used to edit Texinfo source files, it is
  153. automatically selected for files ending in `.texi' or `.texinfo'. It
  154. provides a few basic keybindings to take some of the tedium out of
  155. editing these files.
  156.    Paragraphs are separated by the regexp `^@node', ie, each node is a
  157. separate paragraph.
  158.    The provided keybindings are,
  159. `Ctrl-c Ctrl-c c'
  160.      Insert the string `@code{}', positioning the cursor between the
  161.      braces.
  162. `Ctrl-c Ctrl-c d'
  163.      Insert the string `@dfn{}', positioning the cursor between the
  164.      braces.
  165. `Ctrl-c Ctrl-c e'
  166.      Inserts the string `@end'.
  167. `Ctrl-c Ctrl-c f'
  168.      Inserts the string `@file{}', the cursor is put between the braces.
  169. `Ctrl-c Ctrl-c i'
  170.      Inserts the string `@item'.
  171. `Ctrl-c Ctrl-c l'
  172.      Inserts the string `@lisp\n'.
  173. `Ctrl-c Ctrl-c m'
  174.      Inserts the string `@menu\n'.
  175. `Ctrl-c Ctrl-c Ctrl-m'
  176.      Prompts for the name of a node and makes a menuitem for it.
  177. `Ctrl-c Ctrl-c n'
  178.      Prompts for each part of a node definition (name, next, prev, up)
  179.      and inserts the `@node ...' string needed.
  180. `Ctrl-c Ctrl-c s'
  181.      Inserts the string `@samp{}' and puts the cursor between the
  182.      braces.
  183. `Ctrl-c Ctrl-c v'
  184.      Inserts the string `@var{}', the cursor is put between the braces.
  185. `Ctrl-c Ctrl-c {'
  186.      Inserts a pair of braces with the cursor between them.
  187. `Ctrl-c Ctrl-c }'
  188. `Ctrl-c Ctrl-c ]'
  189.      Moves the cursor to the character after the next closing brace.
  190.  - Function: texinfo-mode
  191.      Mode for editing Texi