TEACL is a fork of TECOC created for the purpose of describing diffs in a document being collaboratively edited
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
6.4 KiB

  1. Running TECOC on Linux
  2. Tecoc takes a first argument of mung, teco, or make to control its
  3. operating mode. In this Linux version, the name of the executable is
  4. tested to provide this first argument. Typically soft links are used
  5. to the tecoc executable, however aliases could be used instead. The
  6. mapping is:
  7. Make is tecoc make (note uppercase first letter)
  8. teco is tecoc teco
  9. mung is tecoc mung
  10. inspect is tecoc teco -inspect
  11. The provided TAR file has these four soft links defined. Extract the
  12. TAR file into a directory in your path, typically /usr/local/bin,
  13. after making sure none of the command names already exist for other
  14. applications. Necessary environment variables and files are described below.
  15. Several option switches are allowed on the TECO command line:
  16. -in[spect] -- Read file only, don't create an output file.
  17. -noc[reate] -- If file doesn't exist, don't create it.
  18. -noi[ni] -- Don't execute INI file. (valid for MAKE or MUNG as well)
  19. -nom[emory] -- don't save filename as "last edited file" (valid for
  20. MAKE also)
  21. -nop[age] -- Formfeeds don't stop file reads (valid for MAKE also)
  22. -nor[ename] -- Don't rename files, but copy them to keep references correct
  23. (OS/2 only)
  24. +nnn -- sets NOPAGE and positions dot to line nnn.
  25. The part of the switch name in the square brackets is optional. For
  26. instance "-in" is the same as "-inspect".
  27. MAKE filespec
  28. starts tecoc to create file filespec. Does equivalent of EWfilespec$$
  29. TECO filespec
  30. starts tecoc to edit file filespec. Does equivalent of
  31. EBfilespec$Y$
  32. TECO filespec2=filespec1
  33. starts tecoc to edit filespec1, writing to filespec2. Does
  34. equivalent of ERfilespec1$EWfilespec2$Y$$
  35. TECO
  36. starts tecoc to edit last edited file. Filename is saved in file
  37. named teco*.tmp in the current directory, unless overriden
  38. (described below).
  39. MUNG filespec <args>
  40. starts tecoc to execute filespec. Equivalent to
  41. I<args>$JEIfilespec$$
  42. You can use "TECO @filespec <args>" instead of MUNG.
  43. **************
  44. Key Bindings
  45. The keys mentioned in the teco.doc file are somewhat confusing.
  46. This should help:
  47. <DELIM> The "Esc" key, "Esc" echoes as "$", however the
  48. teco.doc file shows it as '`'.
  49. <BS> Type as Control-h, this isn't the "Backspace" key.
  50. <DELETE> The "Backspace" key. This isn't the "Delete" key.
  51. <CR> The "Enter" key.
  52. <LF> Type as Control-j.
  53. Note that the assignments for <BS> and <DELETE> shown here are
  54. swapped. <BS> can be "Backspace" and <DELETE> can be control-h by
  55. clearing ET&2048, e.g. 2048,0ET
  56. **************
  57. The Initialization File.
  58. Tecoc mungs (executes as teco commands) the file TECO.INI in the
  59. current directory before processing the command line. Initialization
  60. can be done instead by defining a TEC_INIT environment variable. The
  61. value is either the list of teco commands to execute or a "$" followed
  62. by the pathname of the file containing the initialization file. This
  63. allows a single, centrally located initialization file. REMEMBER that
  64. the "$" must be escaped, i.e. "\$"
  65. The initialization file can be used to make initial settings. It can
  66. return a value, but the value setting is somewhat obscure.
  67. Example (csh):
  68. setenv TEC_INIT 1es
  69. Example (bash):
  70. TEC_INIT=1es
  71. export TEC_INIT
  72. will cause successful searches to auto-display in all teco sessions.
  73. **************
  74. Changing the location of the memory file.
  75. Define the environment variable TEC_MEMORY to be "$" followed by the
  76. pathname of the file designated the memory file.
  77. Example (csh):
  78. setenv TEC_MEMORY ~/teco.mem
  79. setenv TEC_MEMORY \$$TEC_MEMORY
  80. Example (bash):
  81. TEC_MEMORY = ~/teco.mem
  82. TEC_MEMORY = \$$TEC_MEMORY
  83. export TEC_MEMORY
  84. will cause the name of the last edit file to be stored in the file
  85. teco.mem in the home directory. By default the file name is tecoN.tmp in
  86. the current directory, where "N" is the process ID of the parent process to
  87. teco.
  88. **************
  89. The Libary directory
  90. Defining the environment variable TEC_LIBRARY to be a directory path
  91. (including the final "/") will allow the EI command to fetch
  92. teco commands from this directory if the file is not found in the
  93. current directory.
  94. Example (csh):
  95. setenv TEC_LIBRARY=\$/usr/local/lib/
  96. will cause the directory /usr/local/lib to be searched for teco command files.
  97. **************
  98. Implemented flags:
  99. ED&1 Allow carat "^" character in string searches
  100. ED&2 Allow yank and _ unconditionally
  101. ED&16 Failed searches preserve dot
  102. ED&64 Move dot by one after each match in multiple occurance searches
  103. ET&1 Type out in image mode
  104. ET&2 Use scope for delete and control-U (default=1)
  105. ET&4 Accept lowercase input (default=1)
  106. ET&8 ^T reads without echo
  107. ET&32 ^T reads with no wait
  108. ET&128 MUNG mode (abort on error) cleared by "*" prompt
  109. ET&2048 Swap backspace and delete
  110. ET&4096 We are using 8 bit characters (default=1)
  111. ET&32768 Trap control-C
  112. EZ&1 Mark Henderson, who did much of the Unix port, likes the way
  113. VAX/VMS keeps versions of files. VMS appends a semicolon followed
  114. by a version number to files, and has the PURGE command to clean
  115. out old versions of files. If this bit is off, TECO-C will handle
  116. file version numbers, appending the appropriate version number to
  117. file names. Mark supplied a "purge" program (distributed with TECO-C)
  118. for users of this feature. Setting this flag turns off the feature,
  119. to make TECO-C function as expected by the average Unix user. This
  120. flag is set by default.
  121. EZ&128 Don't stop read on formfeeds
  122. EZ&256 If set, don't do newline translation on file read/write -- binary mode.
  123. TECO is based on separate carriage return (CR) and line feed (LF)
  124. line termination. Normally on file input newline (line feed)
  125. characters are converted to CRLF pairs unless preceded
  126. by a CR -- this allows reading DOS format files. On output CRLF pairs
  127. are converted back to new line characters. Set this bit before starting
  128. to edit a binary file, or when editing a DOS file for which no format
  129. conversion is desired (ie file is saved back in DOS format).
  130. EZ&8192 This bit is set by default, but has no significance in this release.
  131. EZ&16384 Normally the backup file name is created by replacing the file extension
  132. with "bak" -- foo.c becomes foo.bak, however if this bit is set then
  133. the backup file name is created by simply adding ".bak" to the name -- foo.c
  134. becomes foo.c.bak. This choice is overridden by EZ&1 = 0.