3 .\" To format this reference page, use the command:
7 .\" $Header: /home/hugh/sources/old_ae/RCS/ee.1,v 1.22 2001/12/16 04:49:27 hugh Exp $
15 ee [-e] [-i] [-h] [+#] [\fIfile\fR ...]
16 ree [-e] [-i] [-h] [+#] [\fIfile\fR ...]
23 is a simple screen oriented text editor. It is always in text insertion
24 mode unless there is a prompt at the bottom of the terminal, or a
25 menu present (in a box in the middle of the terminal). The command
29 but restricted to editing the named
30 file (no file operations, or shell escapes are allowed).
32 An editor with similar user-friendly qualities but more features is available
38 to work properly, the environment variable
40 must be set to indicate the type of terminal being used. For
45 variable should be set to "70092". See your System Administrator if
46 you need more information.
51 The following options are available from the command line:
55 Turns off expansion of tab character to spaces.
58 Turns off display of information window at top of terminal.
61 Turns off highlighting of borders of windows and menus (improves
62 performance on some terminals).
65 Moves the cursor to line '#' at startup.
71 To do anything other than insert text, the user must use the control
74 key, represented by a "^", pressed in conjunction with an
75 alphabetic key, e.g., ^a) and function keys available on the keyboard
77 .BR "Next Page" ", " "Prev Page" ,
80 Since not all terminals have function keys,
82 has the basic cursor movement functions assigned to control keys as
83 well as more intuitive keys on the keyboard when available. For
84 instance, to move the cursor up, the user can use the up arrow key,
91 ^a Prompt for the decimal value of a character to insert.
92 ^b Move to the bottom of the text.
93 ^c Get the prompt for a command.
94 ^d Move the cursor down.
95 ^e Prompt for the string to search for.
96 ^f Undelete the last deleted character.
97 ^g Move to the beginning of the line.
101 ^k Delete the character the cursor is sitting on.
102 ^l Move the cursor left.
104 ^n Move to the next page.
105 ^o Move to the end of the line.
106 ^p Move to the previous page.
107 ^r Move the cursor to the right.
108 ^t Move to the top of the text.
109 ^u Move the cursor up.
110 ^v Undelete the last deleted word.
111 ^w Delete the word beginning at the cursor position.
113 ^y Delete from the cursor position to the end of line.
114 ^z Undelete the last deleted line.
115 ^[ (ESC) Pop up menu.
120 .SS "EMACS keys mode"
122 Since many shells provide an Emacs mode (for cursor movement and other editing
123 operations), some bindings that may be more useful for people familiar with
124 those bindings have been provided. These are accessible via the
126 menu, or via the initialization file (see below). The mappings are as follows:
130 ^a Move to the beginning of the line.
133 ^d Delete character the cursor is sitting on.
135 ^f Forward 1 character.
139 ^j Undelete last deleted character.
141 ^l Undelete last deleted line.
143 ^n Move to the next line.
144 ^o Prompt for the decimal value of a character to insert.
146 ^r Restore last deleted word.
147 ^t Move to the top of the text.
148 ^u Move to the bottom of the text.
149 ^v Move to the next page.
150 ^w Delete the word beginning at the cursor position.
151 ^y Prompt for the string to search for.
153 ^[ (ESC) Pop up menu.
163 .IP "\fBNext Page\fR"
164 Move to the next page.
165 .IP "\fBPrev Page\fR"
166 Move to the previous page.
167 .IP "\fBDelete Char\fR"
168 Delete the character the cursor is on.
169 .IP "\fBDelete Line\fR"
170 Delete from the cursor to the end of line.
171 .IP "\fBInsert line\fR"
172 Insert a newline at the cursor position.
173 .IP "\fBArrow keys\fR"
174 Move the cursor in the direction indicated.
181 Some operations require more information than a single keystroke can
182 provide. For the most basic operations, there is a menu that can be
183 obtained by pressing the
185 key. The same operations, and more can be performed by obtaining the
186 command prompt (^c) and typing in one of the commands below.
189 Execute \fBcmd\fR in a shell.
191 Move to the line indicated.
193 Make searches case sensitive.
194 .IP "\fBcharacter\fR"
195 Display the ascii value of the character at the cursor.
197 Save the edited text, and leave the editor.
199 Expand tabs to spaces.
201 Print the name of the file.
205 Display the current line number.
207 Make searches insensitive to case (the default).
209 Don't expand tab to spaces when the TAB key is pressed.
211 Leave the editor without saving changes.
212 .IP "\fBread\fR \fIfile\fR"
213 Read the named \fIfile\fR.
214 .IP "\fBwrite\fR \fIfile\fR"
215 Write the text to the named \fIfile\fR.
220 .SS "Menu Operations"
222 Pop-up menus can be obtained by pressing the
228 key is present). When in the menu, the escape key can be
229 used to leave the menu without performing any operations. Use the up and
234 for moving down to move to the desired items in the menu, then press
236 to perform the indicated task.
238 To the left of each menu item is a letter, which if the corresponding
239 letter is pressed on the keyboard selects that menu entry.
241 The main menu in \fIee\fR is as follows:
243 .IP "\fBleave editor\fR"
244 If changes have been made, the user will get a menu prompting whether or
245 not the changes should be saved.
247 Displays a help screen, with all of the keyboard operations and commands.
248 .IP "\fBfile operations\fR"
249 Pops up a menu for selecting whether to read a file, write to a file, or
250 save the current contents of the editor, as well as send the contents of
251 the editor to a print command (see the section \fBInitializing ee from a
253 .IP "\fBredraw screen\fR"
254 Provides a means to repaint the screen if the screen has been corrupted.
256 Shows the current values of the operating modes, and right margin. By
257 pressing return when the cursor is on a particular item, the value can be
258 changed. To leave this menu, press the \fBescape\fR key. (See \fBModes\fR
262 Pops up a menu in which the user may choose to enter a string to search
263 for, or search for a string already entered.
264 .IP "\fBmiscellaneous\fR"
265 Pops up a menu that allows the user to format the current paragraph,
266 execute a shell command, or check the spelling of the text in the editor.
269 .\" paragraph formatting
271 .SS "Paragraph Formatting"
273 Paragraphs are defined for \fIee\fR by a block of text bounded by:
277 Begin or end of file.
279 Line with no characters, or only spaces and/or tabs.
281 Line starting with a period ('.') or right angle bracket ('>').
284 A paragraph may be formatted two ways: explicitly by choosing the
285 \fBformat paragraph\fR menu item, or by setting \fIee\fR to automatically
286 format paragraphs. The automatic mode may be set via a menu, or via the
289 There are three states for text operation in \fIee\fR: free-form, margins,
290 and automatic formatting.
292 "Free-form" is best used for things like programming. There are no
293 restrictions on the length of lines, and no formatting takes place.
295 "Margins" allows the user to type in text without having to worry about going
296 beyond the right margin (the right margin may be set in the \fBsettings\fR
297 menu, the default is for the margin to be the right edge of the
298 terminal). This is the mode that allows the \fBformat paragraph\fR menu
301 "Automatic formatting" provides word-processor-like behavior. The user
302 may type in text, while \fIee\fR will make sure the entire paragraph fits
303 within the width of the terminal every time the user inserts a space after
304 typing or deleting text. Margin observation must also be enabled in order for
305 automatic formatting to occur.
311 Although ee is a 'modeless' editor (it is in text insertion mode all the
312 time), there are modes in some of the things it does. These include:
314 .IP "\fBtab expansion\fR"
315 Tabs may be inserted as a single tab character, or replaced with spaces.
316 .IP "\fBcase sensitivity\fR"
317 The search operation can be sensitive to whether characters are upper- or
318 lower-case, or ignore case completely.
319 .IP "\fBmargins observed\fR"
320 Lines can either be truncated at the right margin, or extend on forever.
321 .IP "\fBauto paragraph formatting\fR"
322 While typing in text, the editor can try to keep it looking reasonably well
323 within the width of the screen.
324 .IP "\fBeightbit characters\fR"
325 Toggles whether eight bit characters are displayed as their value in angle
326 brackets (e.g. "<220>") or as a character.
327 .IP "\fBinfo window\fR"
328 A window showing the keyboard operations that can be performed can be
330 .IP "\fBemacs keys\fR"
331 Control keys may be given bindings similar to emacs, or not.
332 .IP "\fB16 bit characters\fR"
333 Toggles whether sixteen bit characters are handled as one 16-bit quantities or
334 two 8-bit quantities. This works primarily with the Chinese Big 5 code set.
337 You may set these modes via the initialization file (see below), or with a
344 There are two ways to have the spelling in the text checked from \fIee\fR.
345 One is by the traditional \fIspell\fR(1) command, the other is with the
346 optional \fIispell\fR(1) command.
348 Using \fIspell\fR, the words that are not recognized will be placed at the top
349 of the file. For the \fIispell\fR option, the file is written to disk,
350 then \fIispell\fR run on the file, and the file read back in once
351 \fIispell\fR has completed making changes to the file.
355 .SS "Printing the contents of the editor"
357 The user may select a menu item which prints the contents of the editor.
359 pipes the text in the editor to the command specified by the
360 initialization command
363 .B Initializing ee from a file
364 below). The default is to send the contents to "lp".
366 Whatever the user assigns to
369 standard input. See your system administrator for more details.
373 .SS "Shell operations"
375 Shell commands can be executed from within
381 menu, or by placing an exclamation mark ("!") before the command to
384 prompt. Additionally, the user may direct the contents of the edit buffer
385 out to a shell operation (via a pipe) by using the left angle bracket
386 (">"), followed by a "!" and the shell command to execute. The output of
387 a shell operation can also be directed into the edit buffer by using a
388 right angle bracket ("<") before the exclamation mark. These can even be
389 used together to send output to a shell operation and read back the
390 results into the editor. So, if the editor contained a list of words
391 to be sorted, they could be sorted by typing the following at the command
398 This would send the contents of the editor to be piped into the
400 utility and the result would be placed into the edit buffer at the current
401 cursor location. The old information would have to be deleted by the user.
403 .\" initializing ee from a file
405 .SS "Initializing ee from a file"
407 Since different users have different preferences, \fIee\fR allows some
408 slight configurability. There are three possible locations for an
409 initialization file for ee: the file \fI/usr/share/misc/init.ee\fR, the
410 file \fI.init.ee\fR in the user's home directory, or the file \fI.init.ee\fR
411 in the current directory (if different from the home
412 directory). This allows system administrators to set some preferences for
413 the users on a system-wide basis (for example, the \fBprint\fR command),
414 and the user to customize settings for particular directories (like one
415 for correspondence, and a different directory for programming).
417 The file \fI\/usr/share/misc/init.ee\fR is read first, then
418 \fI$HOME/.init.ee\fR, then \fI.init.ee\fR, with the settings specified by the
419 most recent file read taking precedence.
421 The following items may be entered in the initialization file:
424 Sets searches to be case sensitive.
426 Sets searches to be insensitive to case (default).
428 Causes \fIee\fR to expand tabs to spaces (default).
430 Causes \fIee\fR to insert tabs as a single character.
432 A small information window is displayed at the top of the terminal
435 Turns off the display of the information window.
437 Causes \fIee\fR to truncate lines at the right margin when the
438 cursor passes beyond the right margin as set by the user
439 while text is being inserted
442 Allows lines to extend beyond the right margin.
444 Causes \fIee\fR to automatically try to format the current paragraph while
445 text insertion is occurring.
446 .IP \fBnoautoformat\fR
447 Turns off automatic paragraph formatting (default).
448 .IP \fBprintcommand\fR
449 Allows the setting of the print command (default: "lp").
450 .IP \fBrightmargin\fR
451 The user can select a value for the right margin (the first column on the
454 Turns on highlighting border of information window and menus (default).
455 .IP \fBnohighlight\fR
456 Turns off highlighting of border of information window and menus.
458 Turns on display of eight bit characters.
460 Turns off display of eight bit characters (they are displayed as their decimal
461 value inside angle brackets, e.g., "<220>").
463 Turns on handling of 16-bit characters.
465 Turns off handling of 16-bit characters.
467 Turns on emacs key bindings.
469 Turns off emacs key bindings.
472 .\" save editor configuration
474 .SS "Save Editor Configuration"
476 When using this entry from the
478 menu, the user may choose to save the current configuration of
479 the editor (see \fBInitializing ee from a
480 file\fR above) to a file named
482 in the current directory or the user's home directory. If a file named
484 already exists, it will be renamed
491 THIS MATERIAL IS PROVIDED "AS IS". THERE ARE
492 NO WARRANTIES OF ANY KIND WITH REGARD TO THIS
493 MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE
494 IMPLIED WARRANTIES OF MERCHANTABILITY AND
495 FITNESS FOR A PARTICULAR PURPOSE. Neither
496 Hewlett-Packard nor Hugh Mahon shall be liable
497 for errors contained herein, nor for
498 incidental or consequential damages in
499 connection with the furnishing, performance or
500 use of this material. Neither Hewlett-Packard
501 nor Hugh Mahon assumes any responsibility for
502 the use or reliability of this software or
503 documentation. This software and
504 documentation is totally UNSUPPORTED. There
505 is no support contract available. Hewlett-Packard
506 has done NO Quality Assurance on ANY
507 of the program or documentation. You may find
508 the quality of the materials inferior to
511 Always make a copy of files that cannot be easily reproduced before
512 editing. Save files early, and save often.
513 .SS "International Code Set Support"
515 supports single-byte character code sets (eight-bit clean), or the
516 Chinese Big-5 code set. (Other multi-byte code sets may function, but the
517 reason Big-5 works is that a two-byte character also takes up two columns on
520 The automatic paragraph formatting operation
521 may be too slow for slower systems.
524 .I /usr/share/misc/init.ee
533 was developed by Hugh Mahon.
535 This software and documentation contains
536 proprietary information which is protected by
537 copyright. All rights are reserved.
539 Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996, 2001 Hugh Mahon.
542 termcap(4), terminfo(4), environ(5), spell(1), ispell(1), lp(1), aee(1)