]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/ee/ee.1
ident(1): Normalizing date format
[FreeBSD/FreeBSD.git] / contrib / ee / ee.1
1 .\"
2 .\"
3 .\"  To format this reference page, use the command:
4 .\"
5 .\"    nroff -man ee.1
6 .\"
7 .\"  $Header: /home/hugh/sources/old_ae/RCS/ee.1,v 1.22 2001/12/16 04:49:27 hugh Exp $
8 .\"
9 .\"
10 .TH ee 1 "" "" ""
11 .SH NAME
12 ee \- easy editor
13 .SH SYNOPSIS
14 .nf
15 ee [-e] [-i] [-h] [+#] [\fIfile\fR ...]
16 ree [-e] [-i] [-h] [+#] [\fIfile\fR ...]
17 .ta
18 .fi
19 .ad b
20 .SH DESCRIPTION
21 The command
22 .I ee
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).
26 The command
27 .I ree
28 is the same as
29 .I ee,
30 but restricted to editing the named file (no file operations, or shell escapes
31 are allowed).
32 .PP
33 An editor with similar user-friendly qualities but more features is available
34 and is called
35 .I aee.
36 .PP
37 For
38 .I ee
39 to work properly, the environment variable
40 .SM TERM
41 must be set to indicate the type of terminal being used.
42 For example, for an
43 .SM HP 700/92
44 terminal, the
45 .SM TERM
46 variable should be set to "70092".
47 See your System Administrator if you need more information.
48 .\"
49 .\"     options
50 .\"
51 .SS Options
52 The following options are available from the command line:
53 .PP
54 .TP 4
55 .B -e
56 Turns off expansion of tab character to spaces.
57 .TP
58 .B -i
59 Turns off display of information window at top of terminal.
60 .TP
61 .B -h
62 Turns off highlighting of borders of windows and menus (improves performance on
63 some terminals).
64 .TP
65 .B +#
66 Moves the cursor to line '#' at startup.
67 .br
68 .\"
69 .\"     control keys
70 .\"
71 .SS "Control keys"
72 To do anything other than insert text, the user must use the control keys (the
73 .B Control
74 key, represented by a "^",  pressed in conjunction with an
75 alphabetic key, e.g., ^a) and function keys available on the keyboard
76 (such as
77 .BR "Next Page" ", " "Prev Page" ,
78 arrow keys, etc.).
79 .PP
80 Since not all terminals have function keys,
81 .I ee
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
85 .BR ^u .
86 .RS 4
87 .nf
88 .ta 1.4i
89 .sp
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.
97 ^h      Backspace.
98 ^i      Tab.
99 ^j      Insert a newline.
100 ^k      Delete the character the cursor is sitting on.
101 ^l      Move the cursor left.
102 ^m      Insert a newline.
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.
111 ^x      Search.
112 ^y      Delete from the cursor position to the end of line.
113 ^z      Undelete the last deleted line.
114 ^[ (ESC)        Pop up menu.
115 .ta
116 .fi
117 .RE
118 .sp
119 .SS "EMACS keys mode"
120 .PP
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
125 .B settings
126 menu, or via the initialization file (see below).
127 The mappings are as follows:
128 .RS
129 .nf
130 .ta 1.4i
131 ^a      Move to the beginning of the line.
132 ^b      Back 1 character.
133 ^c      Command prompt.
134 ^d      Delete character the cursor is sitting on.
135 ^e      End of line.
136 ^f      Forward 1 character.
137 ^g      Go back 1 page.
138 ^h      Backspace.
139 ^i      Tab.
140 ^j      Undelete last deleted character.
141 ^k      Delete line.
142 ^l      Undelete last deleted line.
143 ^m      Insert a newline.
144 ^n      Move to the next line.
145 ^o      Prompt for the decimal value of a character to insert.
146 ^p      Previous line.
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.
153 ^z      Next word.
154 ^[ (ESC)        Pop up menu.
155 .ta
156 .fi
157 .RE
158 .sp
159 .\"
160 .\"     function keys
161 .\"
162 .SS "Function Keys"
163 .RS 4
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.
176 .RE
177 .\"
178 .\"     commands
179 .\"
180 .SS Commands
181 .PP
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
184 pressing the
185 .SM \fBESC\fR
186 key.
187 The same operations, and more can be performed by obtaining the
188 command prompt (^c) and typing in one of the commands below.
189 .RS 4
190 .IP "!\fBcmd\fR"
191 Execute \fBcmd\fR in a shell.
192 .IP "\fB0-9\fR"
193 Move to the line indicated.
194 .IP "\fBcase\fR"
195 Make searches case sensitive.
196 .IP "\fBcharacter\fR"
197 Display the ascii value of the character at the cursor.
198 .IP "\fBexit\fR"
199 Save the edited text, and leave the editor.
200 .IP "\fBexpand\fR"
201 Expand tabs to spaces.
202 .IP "\fBfile\fR"
203 Print the name of the file.
204 .IP "\fBhelp\fR"
205 Display help screen.
206 .IP "\fBline\fR"
207 Display the current line number.
208 .IP "\fBnocase\fR
209 Make searches insensitive to case (the default).
210 .IP "\fBnoexpand\fR"
211 Don't expand tab to spaces when the TAB key is pressed.
212 .IP "\fBquit\fR"
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.
218 .RE
219 .\"
220 .\"     menu operations
221 .\"
222 .SS "Menu Operations"
223 .PP
224 Pop-up menus can be obtained by pressing the
225 .B escape
226 key (or
227 .B ^[
228 if no
229 .B escape
230 key is present).
231 When in the menu, the escape key can be used to leave the menu without performing
232 any operations.
233 Use the up and down arrow keys, or
234 .B ^u
235 for moving up and
236 .B ^d
237 for moving down to move to the desired items in the menu, then press
238 .B return
239 to perform the indicated task.
240 .PP
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.
243 .PP
244 The main menu in \fIee\fR is as follows:
245 .RS 4
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.
249 .IP "\fBhelp\fR"
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
255 file\fR).
256 .IP "\fBredraw screen\fR"
257 Provides a means to repaint the screen if the screen has been corrupted.
258 .IP "\fBsettings\fR"
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
261 changed.
262 To leave this menu, press the \fBescape\fR key.  (See \fBModes\fR below.)
263 .IP "\fBsearch\fR"
264 .br
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.
270 .RE
271 .\"
272 .\"     paragraph formatting
273 .\"
274 .SS "Paragraph Formatting"
275 .PP
276 Paragraphs are defined for \fIee\fR by a block of text bounded by:
277 .sp 
278 .RS 8
279 .IP \(bu
280 Begin or end of file.
281 .IP \(bu
282 Line with no characters, or only spaces and/or tabs.
283 .IP \(bu
284 Line starting with a period ('.') or right angle bracket ('>').
285 .RE
286 .PP
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
290 initialization file.
291 .PP
292 There are three states for text operation in \fIee\fR: free-form, margins,
293 and automatic formatting.
294 .PP
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.
297 .PP
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.
302 .PP
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.
308 .\"
309 .\"     modes
310 .\"
311 .SS Modes
312 .PP
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.
315 These include:
316 .RS 4
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
332 displayed or not.
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.
338 .RE
339 .PP
340 You may set these modes via the initialization file (see below), or with a
341 menu (see above).
342 .\"
343 .\"     spell checking
344 .\"
345 .SS "Spell Checking"
346 .PP
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.
350 .PP
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.
355 .\"
356 .\"     printing
357 .\"
358 .SS "Printing the contents of the editor"
359 .PP
360 The user may select a menu item which prints the contents of the editor.
361 .I ee
362 pipes the text in the editor to the command specified by the initialization
363 command
364 .B printcommand
365 (see the section
366 .B Initializing ee from a file below).
367 The default is to send the contents to "lp".
368 .PP
369 Whatever the user assigns to
370 .B printcommand
371 must take input from standard input.
372 See your system administrator for more details.
373 .\"
374 .\"     shell operations
375 .\"
376 .SS "Shell operations"
377 .PP
378 Shell commands can be executed from within
379 .I ee
380 by selecting the
381 .B shell command
382 item in the
383 .B miscellaneous
384 menu, or by placing an exclamation mark ("!") before the command to
385 execute at the
386 .B command:
387 prompt.
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:
397 .RS 4
398 .sp
399 ><!sort
400 .sp
401 .RE
402 This would send the contents of the editor to be piped into the
403 .I sort
404 utility and the result would be placed into the edit buffer at the current
405 cursor location.
406 The old information would have to be deleted by the user.
407 .\"
408 .\"     initializing ee from a file
409 .\"
410 .SS "Initializing ee from a file"
411 .PP
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).
422 .PP
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.
426 .PP
427 The following items may be entered in the initialization file:
428 .RS 4
429 .IP \fBcase\fR
430 Sets searches to be case sensitive.
431 .IP \fBnocase\fR
432 Sets searches to be insensitive to case (default).
433 .IP \fBexpand\fR
434 Causes \fIee\fR to expand tabs to spaces (default).
435 .IP \fBnoexpand\fR
436 Causes \fIee\fR to insert tabs as a single character.
437 .IP \fBinfo\fR
438 A small information window is displayed at the top of the terminal (default).
439 .IP \fBnoinfo\fR
440 Turns off the display of the information window.
441 .IP \fBmargins\fR
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).
444 .IP \fBnomargins\fR
445 Allows lines to extend beyond the right margin.
446 .IP \fBautoformat\fR
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).
455 .IP \fBhighlight\fR
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.
459 .IP \fBeightbit\fR
460 Turns on display of eight bit characters.
461 .IP \fBnoeightbit\fR
462 Turns off display of eight bit characters (they are displayed as their decimal
463 value inside angle brackets, e.g., "<220>").
464 .IP \fB16bit\fR
465 Turns on handling of 16-bit characters.
466 .IP \fBno16bit\fR
467 Turns off handling of 16-bit characters.
468 .IP \fBemacs\fR
469 Turns on emacs key bindings.
470 .IP \fBnoemacs\fR
471 Turns off emacs key bindings.
472 .RE
473 .\"
474 .\"     save editor configuration
475 .\"
476 .SS "Save Editor Configuration"
477 .PP
478 When using this entry from the
479 .B settings
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
483 .I .init.ee
484 in the current directory or the user's home directory.
485 If a file named
486 .I .init.ee
487 already exists, it will be renamed
488 .IR .init.ee.old .
489 .\"
490 .\"     Caveats
491 .\"
492 .SH CAVEATS
493 .PP
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
512 supported materials.
513 .PP
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"
517 .I ee
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.)
522 .SH WARNINGS
523 The automatic paragraph formatting operation may be too slow for
524 slower systems.
525 .SH FILES
526 .PP
527 .I /usr/share/misc/init.ee
528 .br
529 .I $HOME/.init.ee
530 .br
531 .I .init.ee
532 .SH AUTHOR
533 .PP
534 The software
535 .I ee
536 was developed by Hugh Mahon.
537 .PP
538 This software and documentation contains
539 proprietary information which is protected by
540 copyright.  All rights are reserved.
541 .PP
542 Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996, 2001 Hugh Mahon.
543 .SH "SEE ALSO"
544 .PP
545 termcap(4), terminfo(4), environ(5), spell(1), ispell(1), lp(1), aee(1)
546