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.
24 It is always in text insertion mode unless there is a prompt at the bottom
25 of the terminal, or a menu present (in a box in the middle of the terminal).
30 but restricted to editing the named file (no file operations, or shell escapes
33 An editor with similar user-friendly qualities but more features is available
39 to work properly, the environment variable
41 must be set to indicate the type of terminal being used.
46 variable should be set to "70092".
47 See your System Administrator if you need more information.
52 The following options are available from the command line:
56 Turns off expansion of tab character to spaces.
59 Turns off display of information window at top of terminal.
62 Turns off highlighting of borders of windows and menus (improves performance on
66 Moves the cursor to line '#' at startup.
72 To do anything other than insert text, the user must use the control keys (the
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 well as more
83 intuitive keys on the keyboard when available.
84 For instance, to move the cursor up, the user can use the up arrow key, or
90 ^a Prompt for the decimal value of a character to insert.
91 ^b Move to the bottom of the text.
92 ^c Get the prompt for a command.
93 ^d Move the cursor down.
94 ^e Prompt for the string to search for.
95 ^f Undelete the last deleted character.
96 ^g Move to the beginning of the line.
100 ^k Delete the character the cursor is sitting on.
101 ^l Move the cursor left.
103 ^n Move to the next page.
104 ^o Move to the end of the line.
105 ^p Move to the previous page.
106 ^r Move the cursor to the right.
107 ^t Move to the top of the text.
108 ^u Move the cursor up.
109 ^v Undelete the last deleted word.
110 ^w Delete the word beginning at the cursor position.
112 ^y Delete from the cursor position to the end of line.
113 ^z Undelete the last deleted line.
114 ^[ (ESC) Pop up menu.
119 .SS "EMACS keys mode"
121 Since many shells provide an Emacs mode (for cursor movement and other editing
122 operations), some bindings that may be more useful for people familiar with those
123 bindings have been provided.
124 These are accessible via the
126 menu, or via the initialization file (see below).
127 The mappings are as follows:
131 ^a Move to the beginning of the line.
134 ^d Delete character the cursor is sitting on.
136 ^f Forward 1 character.
140 ^j Undelete last deleted character.
142 ^l Undelete last deleted line.
144 ^n Move to the next line.
145 ^o Prompt for the decimal value of a character to insert.
147 ^r Restore last deleted word.
148 ^t Move to the top of the text.
149 ^u Move to the bottom of the text.
150 ^v Move to the next page.
151 ^w Delete the word beginning at the cursor position.
152 ^y Prompt for the string to search for.
154 ^[ (ESC) Pop up menu.
164 .IP "\fBNext Page\fR"
165 Move to the next page.
166 .IP "\fBPrev Page\fR"
167 Move to the previous page.
168 .IP "\fBDelete Char\fR"
169 Delete the character the cursor is on.
170 .IP "\fBDelete Line\fR"
171 Delete from the cursor to the end of line.
172 .IP "\fBInsert line\fR"
173 Insert a newline at the cursor position.
174 .IP "\fBArrow keys\fR"
175 Move the cursor in the direction indicated.
182 Some operations require more information than a single keystroke can provide.
183 For the most basic operations, there is a menu that can be obtained by
187 The same operations, and more can be performed by obtaining the
188 command prompt (^c) and typing in one of the commands below.
191 Execute \fBcmd\fR in a shell.
193 Move to the line indicated.
195 Make searches case sensitive.
196 .IP "\fBcharacter\fR"
197 Display the ascii value of the character at the cursor.
199 Save the edited text, and leave the editor.
201 Expand tabs to spaces.
203 Print the name of the file.
207 Display the current line number.
209 Make searches insensitive to case (the default).
211 Don't expand tab to spaces when the TAB key is pressed.
213 Leave the editor without saving changes.
214 .IP "\fBread\fR \fIfile\fR"
215 Read the named \fIfile\fR.
216 .IP "\fBwrite\fR \fIfile\fR"
217 Write the text to the named \fIfile\fR.
222 .SS "Menu Operations"
224 Pop-up menus can be obtained by pressing the
231 When in the menu, the escape key can be used to leave the menu without performing
233 Use the up and down arrow keys, or
237 for moving down to move to the desired items in the menu, then press
239 to perform the indicated task.
241 To the left of each menu item is a letter, which if the corresponding letter is pressed
242 on the keyboard selects that menu entry.
244 The main menu in \fIee\fR is as follows:
246 .IP "\fBleave editor\fR"
247 If changes have been made, the user will get a menu prompting whether or not the
248 changes should be saved.
250 Displays a help screen, with all of the keyboard operations and commands.
251 .IP "\fBfile operations\fR"
252 Pops up a menu for selecting whether to read a file, write to a file, or
253 save the current contents of the editor, as well as send the contents of
254 the editor to a print command (see the section \fBInitializing ee from a
256 .IP "\fBredraw screen\fR"
257 Provides a means to repaint the screen if the screen has been corrupted.
259 Shows the current values of the operating modes, and right margin. By
260 pressing return when the cursor is on a particular item, the value can be
262 To leave this menu, press the \fBescape\fR key. (See \fBModes\fR below.)
265 Pops up a menu in which the user may choose to enter a string to search
266 for, or search for a string already entered.
267 .IP "\fBmiscellaneous\fR"
268 Pops up a menu that allows the user to format the current paragraph,
269 execute a shell command, or check the spelling of the text in the editor.
272 .\" paragraph formatting
274 .SS "Paragraph Formatting"
276 Paragraphs are defined for \fIee\fR by a block of text bounded by:
280 Begin or end of file.
282 Line with no characters, or only spaces and/or tabs.
284 Line starting with a period ('.') or right angle bracket ('>').
287 A paragraph may be formatted two ways: explicitly by choosing the
288 \fBformat paragraph\fR menu item, or by setting \fIee\fR to automatically
289 format paragraphs. The automatic mode may be set via a menu, or via the
292 There are three states for text operation in \fIee\fR: free-form, margins,
293 and automatic formatting.
295 "Free-form" is best used for things like programming. There are no
296 restrictions on the length of lines, and no formatting takes place.
298 "Margins" allows the user to type in text without having to worry about going
299 beyond the right margin (the right margin may be set in the \fBsettings\fR
300 menu, the default is for the margin to be the right edge of the terminal).
301 This is the mode that allows the \fBformat paragraph\fR menu item to work.
303 "Automatic formatting" provides word-processor-like behavior.
304 The user may type in text, while \fIee\fR will make sure the entire paragraph fits
305 within the width of the terminal every time the user inserts a space after
306 typing or deleting text.
307 Margin observation must also be enabled in order for automatic formatting to occur.
313 Although ee is a 'modeless' editor (it is in text insertion mode all the
314 time), there are modes in some of the things it does.
317 .IP "\fBtab expansion\fR"
318 Tabs may be inserted as a single tab character, or replaced with spaces.
319 .IP "\fBcase sensitivity\fR"
320 The search operation can be sensitive to whether characters are upper- or
321 lower-case, or ignore case completely.
322 .IP "\fBmargins observed\fR"
323 Lines can either be truncated at the right margin, or extend on forever.
324 .IP "\fBauto paragraph formatting\fR"
325 While typing in text, the editor can try to keep it looking reasonably well
326 within the width of the screen.
327 .IP "\fBeightbit characters\fR"
328 Toggles whether eight bit characters are displayed as their value in angle
329 brackets (e.g. "<220>") or as a character.
330 .IP "\fBinfo window\fR"
331 A window showing the keyboard operations that can be performed can be
333 .IP "\fBemacs keys\fR"
334 Control keys may be given bindings similar to emacs, or not.
335 .IP "\fB16 bit characters\fR"
336 Toggles whether sixteen bit characters are handled as one 16-bit quantity or
337 two 8-bit quantities. This works primarily with the Chinese Big 5 code set.
340 You may set these modes via the initialization file (see below), or with a
347 There are two ways to have the spelling in the text checked from \fIee\fR.
348 One is by the traditional \fIspell\fR(1) command, the other is with the
349 optional \fIispell\fR(1) command.
351 Using \fIspell\fR, the words that are not recognized will be placed at the top
352 of the file. For the \fIispell\fR option, the file is written to disk,
353 then \fIispell\fR run on the file, and the file read back in once
354 \fIispell\fR has completed making changes to the file.
358 .SS "Printing the contents of the editor"
360 The user may select a menu item which prints the contents of the editor.
362 pipes the text in the editor to the command specified by the initialization
366 .B Initializing ee from a file below).
367 The default is to send the contents to "lp".
369 Whatever the user assigns to
371 must take input from standard input.
372 See your system administrator for more details.
376 .SS "Shell operations"
378 Shell commands can be executed from within
384 menu, or by placing an exclamation mark ("!") before the command to
388 Additionally, the user may direct the contents of the edit buffer out to
389 a shell operation (via a pipe) by using the left angle bracket
390 (">"), followed by a "!" and the shell command to execute.
391 The output of a shell operation can also be directed into the
392 edit buffer by using a right angle bracket ("<") before the exclamation mark.
393 These can even be used together to send output to a shell operation and
394 read back the results into the editor.
395 So, if the editor contained a list of words to be sorted, they could be
396 sorted by typing the following at the command prompt:
402 This would send the contents of the editor to be piped into the
404 utility and the result would be placed into the edit buffer at the current
406 The old information would have to be deleted by the user.
408 .\" initializing ee from a file
410 .SS "Initializing ee from a file"
412 Since different users have different preferences, \fIee\fR allows some
413 slight configurability.
414 There are three possible locations for an initialization file for ee:
415 the file \fI/usr/share/misc/init.ee\fR, the file \fI.init.ee\fR in the
416 user's home directory, or the file \fI.init.ee\fR in the current directory
417 (if different from the home directory).
418 This allows system administrators to set some preferences for the users on a
419 system-wide basis (for example, the \fBprint\fR command), and the user to customize
420 settings for particular directories (like one for correspondence, and a
421 different directory for programming).
423 The file \fI\/usr/share/misc/init.ee\fR is read first, then
424 \fI$HOME/.init.ee\fR, then \fI.init.ee\fR, with the settings specified by the most
425 recent file read taking precedence.
427 The following items may be entered in the initialization file:
430 Sets searches to be case sensitive.
432 Sets searches to be insensitive to case (default).
434 Causes \fIee\fR to expand tabs to spaces (default).
436 Causes \fIee\fR to insert tabs as a single character.
438 A small information window is displayed at the top of the terminal (default).
440 Turns off the display of the information window.
442 Causes \fIee\fR to truncate lines at the right margin when the cursor passes
443 beyond the right margin as set by the user while text is being inserted (default).
445 Allows lines to extend beyond the right margin.
447 Causes \fIee\fR to automatically try to format the current paragraph while
448 text insertion is occurring.
449 .IP \fBnoautoformat\fR
450 Turns off automatic paragraph formatting (default).
451 .IP \fBprintcommand\fR
452 Allows the setting of the print command (default: "lp").
453 .IP \fBrightmargin\fR
454 The user can select a value for the right margin (the first column on the screen is zero).
456 Turns on highlighting border of information window and menus (default).
457 .IP \fBnohighlight\fR
458 Turns off highlighting of border of information window and menus.
460 Turns on display of eight bit characters.
462 Turns off display of eight bit characters (they are displayed as their decimal
463 value inside angle brackets, e.g., "<220>").
465 Turns on handling of 16-bit characters.
467 Turns off handling of 16-bit characters.
469 Turns on emacs key bindings.
471 Turns off emacs key bindings.
474 .\" save editor configuration
476 .SS "Save Editor Configuration"
478 When using this entry from the
480 menu, the user may choose to save the current configuration of
481 the editor (see \fBInitializing ee from a
482 file\fR above) to a file named
484 in the current directory or the user's home directory.
487 already exists, it will be renamed
494 THIS MATERIAL IS PROVIDED "AS IS". THERE ARE
495 NO WARRANTIES OF ANY KIND WITH REGARD TO THIS
496 MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE
497 IMPLIED WARRANTIES OF MERCHANTABILITY AND
498 FITNESS FOR A PARTICULAR PURPOSE. Neither
499 Hewlett-Packard nor Hugh Mahon shall be liable
500 for errors contained herein, nor for
501 incidental or consequential damages in
502 connection with the furnishing, performance or
503 use of this material. Neither Hewlett-Packard
504 nor Hugh Mahon assumes any responsibility for
505 the use or reliability of this software or
506 documentation. This software and
507 documentation is totally UNSUPPORTED. There
508 is no support contract available. Hewlett-Packard
509 has done NO Quality Assurance on ANY
510 of the program or documentation. You may find
511 the quality of the materials inferior to
514 Always make a copy of files that cannot be easily reproduced before
515 editing. Save files early, and save often.
516 .SS "International Code Set Support"
518 supports single-byte character code sets (eight-bit clean), or the
519 Chinese Big-5 code set.
520 (Other multi-byte code sets may function, but the reason Big-5 works is
521 that a two-byte character also takes up two columns on the screen.)
523 The automatic paragraph formatting operation may be too slow for
527 .I /usr/share/misc/init.ee
536 was developed by Hugh Mahon.
538 This software and documentation contains
539 proprietary information which is protected by
540 copyright. All rights are reserved.
542 Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996, 2001 Hugh Mahon.
545 termcap(4), terminfo(4), environ(5), spell(1), ispell(1), lp(1), aee(1)