home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / Applications / Em_Editor / em.n < prev    next >
Encoding:
Text File  |  1998-10-12  |  5.4 KB  |  189 lines

  1. .th EM I 4/2/76
  2. .if t .ds q \(aa
  3. .if n .ds q '
  4. .sh NAME
  5. em \*- editor for mortals
  6. .sh SYNOPSIS
  7. em
  8. [
  9. .bd \*-
  10. ] [ -p ] [ name ]
  11. .sh DESCRIPTION
  12. .it Em
  13. is a QMC variant of the standard Unix text editor - ed.
  14. It includes all of ed, so the documentation for ed
  15. is fully applicable to em.
  16. Em also has a number of new commands and facilities designed to
  17. improve its interaction
  18. and increase its usefulness to users at fast vdu terminals (such
  19. as the ITT's at QMC).
  20.  
  21. .it Em
  22. differs from ed in that it normally prefixes command lines with a '>'.
  23. For those who prefer silence, if the editor is invoked by any
  24. name not having 'm' as its second character, no prompts will appear.
  25. Other ways of controlling prompts are described below.
  26.  
  27. Commands to em may be typed in upper- or lower-case letters.
  28.  
  29. .it Em
  30. has the following extra commands. They are designed principally
  31. for use at
  32. any Teletype-compatible terminal operating at speeds of 1200 baud
  33. or more.
  34. .s3
  35. .lp +5 5
  36. b
  37. .lp+5 5
  38. b-
  39. .br
  40. The 'break' command 'b'
  41. turns on automatic line breaks. During subsequent input to the 'open'
  42. command (see below), the first space after character position
  43. 60 of each line typed will be replaced by a 'newline'.
  44. Automatic line breaks are inserted only during input with one of
  45. the variants of the 'o' command.
  46. They may be suppressed by the command 'b-'.
  47. If the current saved filename ends in '.n' or '.r', then 'b' is automatically
  48. invoked.
  49. .s3
  50. .lp +5 5
  51. h
  52. .br
  53. The 'help' command displays a summary of the commands available in em.
  54. The summary resides
  55. in /usr/lib/emhelp, and is designed to fill exactly 18 lines of
  56. 80 characters. 
  57. .s3
  58. .lp +5 5
  59. ( \fB. \fR, \fB. \fR)o
  60. .lp +5 5
  61. ( \fB. \fR, \fB. \fR)o/regular expression/
  62. .lp+5 5
  63. ( \fB. \fR, \fB. \fR)o+
  64. .lp+5 5
  65. ( \fB. \fR, \fB. \fR)o-
  66. .lp+5 5
  67. ( \fB. \fR, \fB. \fR)o\\
  68. .br
  69. The 'open' command provides an additional level of editing
  70. for interactive corrections during input of new lines of text
  71. and for alterations to existing lines.
  72. The first two forms of the 'o' command operate on an existing
  73. line. The line
  74. is opened with the cursor positioned at the first occurence of the regular
  75. expression if present,
  76. otherwise at the start of the line.
  77.  
  78. The commands 'o+', 'o-' and 'o\\' are equivalent to the 'a', 'i'
  79. and 'c' commands respectively, except in their use of the control
  80. keys listed below, and in that they are not terminated by a line
  81. containing a single '.', but by an ESCAPE or ^D. 'o;' is equivalent
  82. to 'o+'.
  83. In all variants of the 'o' command it is possible to position
  84. the cursor within the line, to delete characters, words or portions
  85. of the line, 
  86. and to insert new text at any point, using control keys
  87. as follows:
  88.  
  89. .nf
  90. .in +5
  91.  
  92. ^A              re-display curent line to cursor
  93. ^B            move cursor back one word
  94. ESCAPE or ^D    exit from 'o' mode
  95. ^E              display all of current line
  96. ^F              delete forwards to end of current line
  97. ^H              gives summary of control keys
  98. ^Q              display next character
  99. ^R              Release margin
  100. ^S              re-scan from start of current line
  101. ^V        verify spelling of preceding alphabetic
  102.             string (see "spell(I)")
  103. ^W              display next word
  104. ^Z              delete preceding word
  105. # or ^X         delete preceding character
  106. @               delete backwards to start of current line
  107. RUBOUT          exit with current line unchanged
  108. .in -5
  109. .fi
  110.  
  111.  
  112. Other characters (including RETURN) are inserted as typed.
  113. In this mode, diagnostic information is provided on ITT terminals
  114. in the form of a
  115. backward '?' when control keys are used inappropriately. When the automatic
  116. line break facility is operative, a 'bell' is transmitted to
  117. the terminal before each newline is inserted. The newline may
  118. be inhibited by the '^R' code.
  119.  
  120. .s3
  121. .lp +5 5
  122. ( \fB. \fR, \fB. \fR)x/regular expression/replacement/
  123. .br
  124. The exchange command performs exactly the same functions
  125. as an equivalent substitute command 's', except that it enables
  126. the user to determine
  127. interactively whether or not each replacement is to be
  128. performed.
  129. Each instance of the specified regular expression
  130. is displayed, underscored with '^' characters.
  131. The user must type '.' RETURN to perform the replacement or
  132. just RETURN to omit it.
  133.  
  134. .s3
  135. .lp +5 5
  136. ( \fB. \fR)
  137. "
  138. .br
  139. The " command is equivalent to '.+1,.+17p'.
  140. .s3
  141. .lp +5 5
  142. ( \fB. \fR)
  143. %
  144. .br
  145. The % command is equivalent to '.-7,.+7p', except that the value
  146. of '.' is unchanged by it, and the current line is separated from its
  147. neighbours on the screen by a line of '-'s.
  148. .s3
  149. .lp +5 5
  150. ( \fB. \fR)
  151. &
  152. .br
  153. This is equivalent to '.-16,.p'.
  154. .s3
  155. .lp +5 5
  156. !
  157. .br
  158. Two additional facilities are available under the '!' (escape to UNIX)
  159. command. '!!'repeats the last command executed in ! mode.
  160.  '%' anywhere in a '!' line is replaced by the currently selected
  161. filename.
  162. .s3
  163. .lp +5 5
  164. >
  165. .lp +5 5
  166. <
  167. .br
  168.  '>' turns prompting off, '<' turns it on again.
  169.  
  170. .in -5
  171. When using 'x' or 's' in em it is possible to obtain a count of the
  172. number of replacements performed by postfixing the command with an 'n'.
  173. Unsuccessful searches for strings in em are indicated by '??'.
  174. .sh FILES
  175.  /usr/emhelp
  176. .sh "SEE ALSO"
  177. ed(I), spell(I)
  178. .br
  179. A Tutorial Introduction to the ED Text Editor
  180. (B. W. Kernighan)
  181. .sh BUGS
  182. The underscoring in the 'x' command is sometimes incorrect on ITT terminals,
  183. especially when the
  184. line contains {,},\\- or \\!.
  185. The
  186. ",% and & commands should restrict their scope to the dimensions
  187. of whatever screen is in use.
  188. Tab settings are assumed to be at every eighth character position.
  189.