]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/ee/ee.1
Remove non-existent (missing?) fonts.alias from beforeinstall: target
[FreeBSD/FreeBSD.git] / usr.bin / ee / ee.1
1 .\"
2 .\" $FreeBSD$
3 .\"
4 .Dd August 30, 1995
5 .Dt EE 1
6 .Os
7 .Sh NAME
8 .Nm ee
9 .Nd easy editor
10 .Sh SYNOPSIS
11 .Nm
12 .Op Fl  eih
13 .Op +#
14 .Op Ar
15 .Nm ree
16 .Op Fl eih
17 .Op +#
18 .Op Ar
19 .Sh DESCRIPTION
20 The command
21 .Nm
22 is a simple screen oriented text editor.  It is always in text insertion
23 mode unless there is a prompt at the bottom of the terminal, or a
24 menu present (in a box in the middle of the terminal).  The command
25 .Nm ree
26 is the same as
27 .Nm ,
28 but restricted to editing the named
29 file (no file operations, or shell escapes are allowed).
30 .Pp
31 For
32 .Nm
33 to work properly, the environment variable
34 .Ev TERM
35 must be set to indicate the type of terminal being used.  For
36 example, for an
37 .Tn HP 700/92
38 terminal, the
39 .Ev TERM
40 variable should be set to "70092".  See your System Administrator if
41 you need more information.
42 .Pp
43 The following options are available:
44 .Bl -tag -width indent
45 .It Fl e
46 Turn off expansion of tab character to spaces.
47 .It Fl i
48 Turn off display of information window at top of terminal.
49 .It Fl h
50 Turn off highlighting of borders of windows and menus (improves
51 performance on some terminals).
52 .It Sy +#
53 Move the cursor to line '#' at startup.
54 .El
55 .Ss "Control keys"
56 To do anything other than insert text, the user must use the control
57 keys (the
58 .Li Control
59 key, represented by a "^",  pressed in conjunction with an
60 alphabetic key, e.g., ^a) and function keys available on the keyboard
61 (such as
62 .Em "Next Page" ,
63 .Em "Prev Page" ,
64 arrow keys, etc.).
65 .Pp
66 Since not all terminals have function keys,
67 .Nm
68 has the basic cursor movement functions assigned to control keys as
69 well as more intuitive keys on the keyboard when available.  For
70 instance, to move the cursor up, the user can use the up arrow key,
71 or
72 .Em ^u .
73 .Bl -tag -width indent
74 .It ^a
75 Prompt for the decimal value of a character to insert.
76 .It ^b
77 Move to the bottom of the text.
78 .It ^c
79 Get the prompt for a command.
80 .It ^d
81 Move the cursor down.
82 .It ^e
83 Prompt for the string to search for.
84 .It ^f
85 Undelete the last deleted character.
86 .It ^g
87 Move to the beginning of the line.
88 .It ^h
89 Backspace.
90 .It ^i
91 Tab.
92 .It ^j
93 Insert a newline.
94 .It ^k
95 Delete the character the cursor is sitting on.
96 .It ^l
97 Move the cursor left.
98 .It ^m
99 Insert a newline.
100 .It ^n
101 Move to the next page.
102 .It ^o
103 Move to the end of the line.
104 .It ^p
105 Move to the previous page.
106 .It ^r
107 Move the cursor to the right.
108 .It ^t
109 Move to the top of the text.
110 .It ^u
111 Move the cursor up.
112 .It ^v
113 Undelete the last deleted word.
114 .It ^w
115 Delete the word beginning at the cursor position.
116 .It ^x
117 Search.
118 .It ^y
119 Delete from the cursor position to the end of line.
120 .It ^z
121 Undelete the last deleted line.
122 .It ^[ (ESC)
123 Pop up menu.
124 .El
125 .Ss "EMACS keys mode"
126 Since many shells provide an Emacs mode (for cursor movement and other editing
127 operations), some bindings that may be more useful for people familiar with
128 those bindings have been provided.  These are accessible via the
129 .Em settings
130 menu, or via the initialization file (see below).  The mappings are as follows:
131 .Bl -tag -width indent
132 .It ^a
133 Move to the beginning of the line.
134 .It ^b
135 Back 1 character.
136 .It ^c
137 Command prompt.
138 .It ^d
139 Delete character the cursor is sitting on.
140 .It ^e
141 End of line.
142 .It ^f
143 Forward 1 character.
144 .It ^g
145 Go back 1 page.
146 .It ^h
147 Backspace.
148 .It ^i
149 Tab.
150 .It ^j
151 Undelete last deleted character.
152 .It ^k
153 Delete line.
154 .It ^l
155 Undelete last deleted line.
156 .It ^m
157 Insert a newline.
158 .It ^n
159 Move to the next line.
160 .It ^o
161 Prompt for the decimal value of a character to insert.
162 .It ^p
163 Previous line.
164 .It ^r
165 Restore last deleted word.
166 .It ^t
167 Move to the top of the text.
168 .It ^u
169 Move to the bottom of the text.
170 .It ^v
171 Move to the next page.
172 .It ^w
173 Delete the word beginning at the cursor position.
174 .It ^y
175 Prompt for the string to search for.
176 .It ^z
177 Next word.
178 .It ^[ (ESC)
179 Pop up menu.
180 .El
181 .Ss "Function Keys"
182 .Bl -tag -width indent
183 .It Next Page
184 Move to the next page.
185 .It Prev Page
186 Move to the previous page.
187 .It Delete Char
188 Delete the character the cursor is on.
189 .It Delete Line
190 Delete from the cursor to the end of line.
191 .It Insert line
192 Insert a newline at the cursor position.
193 .It Arrow keys
194 Move the cursor in the direction indicated.
195 .El
196 .Ss Commands
197 Some operations require more information than a single keystroke can
198 provide.  For the most basic operations, there is a menu that can be
199 obtained by pressing the
200 .Tn ESC
201 key.  The same operations, and more can be performed by obtaining the
202 command prompt (^c) and typing in one of the commands below.
203 .Bl -tag -width indent
204 .It ! Ns Ar cmd
205 Execute
206 .Ar cmd
207 in a shell.
208 .It 0-9
209 Move to the line indicated.
210 .It case
211 Make searches case sensitive.
212 .It character
213 Display the ASCII value of the character at the cursor.
214 .It exit
215 Save the edited text, and leave the editor.
216 .It expand
217 Expand tabs to spaces.
218 .It file
219 Print the name of the file.
220 .It help
221 Display help screen.
222 .It line
223 Display the current line number.
224 .It nocase
225 Make searches insensitive to case (the default).
226 .It noexpand
227 Don't expand tab to spaces when the TAB key is pressed.
228 .It quit
229 Leave the editor without saving changes.
230 .It read Ar file
231 Read the named
232 .Ar file .
233 .It write Ar file
234 Write the text to the named
235 .Ar file .
236 .El
237 .Ss "Menu Operations"
238 Pop-up menus can be obtained by pressing the
239 .Em escape
240 key (or
241 .Em ^[
242 if no
243 .Em escape
244 key is present).  When in the menu, the escape key can be
245 used to leave the menu without performing any operations.  Use the up and
246 down arrow keys, or
247 .Em ^u
248 for moving up and
249 .Em ^d
250 for moving down to move to the desired items in the menu, then press
251 .Em return
252 to perform the indicated task.
253 .Pp
254 To the left of each menu item is a letter, which if the corresponding
255 letter is pressed on the keyboard selects that menu entry.
256 .Pp
257 The main menu in
258 .Nm
259 is as follows:
260 .Bl -tag -width indent
261 .It leave editor
262 If changes have been made, the user will get a menu prompting whether or
263 not the changes should be saved.
264 .It help
265 Display a help screen, with all of the keyboard operations and commands.
266 .It file operations
267 Pop up a menu for selecting whether to read a file, write to a file, or
268 save the current contents of the editor, as well as send the contents of
269 the editor to a print command (see the section
270 .Sx "Initializing ee from a file" ) .
271 .It redraw screen
272 Provide a means to repaint the screen if the screen has been corrupted.
273 .It settings
274 Show the current values of the operating modes, and right margin.  By
275 pressing return when the cursor is on a particular item, the value can be
276 changed.  To leave this menu, press the
277 .Em escape
278 key. (See
279 .Sx Modes
280 below.)
281 .It search
282 Pop up a menu in which the user may choose to enter a string to search
283 for, or search for a string already entered.
284 .It miscellaneous
285 Pop up a menu that allows the user to format the current paragraph,
286 execute a shell command, or check the spelling of the text in the editor.
287 .El
288 .Ss "Paragraph Formatting"
289 Paragraphs are defined for
290 .Nm
291 by a block of text bounded by:
292 .Bl -bullet -width indent
293 .It
294 Begin or end of file.
295 .It
296 Line with no characters, or only spaces and/or tabs.
297 .It
298 Line starting with a period ('.') or right angle bracket ('>').
299 .El
300 .Pp
301 A paragraph may be formatted two ways:  explicitly by choosing the
302 .Em format paragraph
303 menu item, or by setting
304 .Nm
305 to automatically
306 format paragraphs.  The automatic mode may be set via a menu, or via the
307 initialization file.
308 .Pp
309 There are three states for text operation in
310 .Nm :
311 free-form, margins,
312 and automatic formatting.
313 .Pp
314 "Free-form" is best used for things like programming.  There are no
315 restrictions on the length of lines, and no formatting takes place.
316 .Pp
317 "Margins" allows the user to type in text without having to worry about going
318 beyond the right margin (the right margin may be set in the
319 .Em settings
320 menu, the default is for the margin to be the right edge of the
321 terminal).  This is the mode that allows the
322 .Em format paragraph
323 menu item to work.
324 .Pp
325 "Automatic formatting" provides word-processor-like behavior.  The user
326 may type in text, while
327 .Nm
328 will make sure the entire paragraph fits
329 within the width of the terminal every time the user inserts a space after
330 typing or deleting text.  Margin observation must also be enabled in order for
331 automatic formatting to occur.
332 .Ss Modes
333 Although
334 .Nm
335 is a 'modeless' editor (it is in text insertion mode all the
336 time), there are modes in some of the things it does.  These include:
337 .Bl -tag -width indent
338 .It tab expansion
339 Tabs may be inserted as a single tab character, or replaced with spaces.
340 .It case sensitivity
341 The search operation can be sensitive to whether characters are upper- or
342 lower-case, or ignore case completely.
343 .It margins observed
344 Lines can either be truncated at the right margin, or extend on forever.
345 .It auto paragraph formatting
346 While typing in text, the editor can try to keep it looking reasonably well
347 within the width of the screen.
348 .It eightbit characters
349 Toggle whether eight bit characters are displayed as their value in angle
350 brackets (e.g. "<220>") or as a character.
351 .It info window
352 A window showing the keyboard operations that can be performed can be
353 displayed or not.
354 .It emacs keys
355 Control keys may be given bindings similar to emacs, or not.
356 .It 16 bit characters
357 Toggles whether sixteen bit characters are handled as one 16-bit quantities or
358 two 8-bit quantities.  This works primarily with the Chinese Big 5 code set.
359 .El
360 .Pp
361 You may set these modes via the initialization file (see below), or with a
362 menu (see above).
363 .Ss "Spell Checking"
364 There are two ways to have the spelling in the text checked from
365 .Nm .
366 One is by the traditional
367 .Xr spell 1
368 command, the other is with the
369 optional
370 .Xr ispell 1
371 command.
372 .Pp
373 Using
374 .Nm spell ,
375 the words that are not recognized will be placed at the top
376 of the file.  For the
377 .Nm ispell
378 option, the file is written to disk,
379 then
380 .Nm ispell
381 run on the file, and the file read back in once
382 .Nm ispell
383 has completed making changes to the file.
384 .Ss "Printing the contents of the editor"
385 The user may select a menu item which prints the contents of the editor.
386 .Nm
387 pipes the text in the editor to the command specified by the
388 initialization command
389 .Em printcommand
390 (see the section
391 .Sx Initializing ee from a file
392 below).  The default is to send the contents to
393 .Xr lp 1 .
394 .Pp
395 Whatever the user assigns to
396 .Em printcommand
397 must take input from
398 standard input.  See your system administrator for more details.
399 .Ss "Shell operations"
400 Shell commands can be executed from within
401 .Nm
402 by selecting the
403 .Em shell command
404 item in the
405 .Em miscellaneous
406 menu, or by placing an exclamation mark ("!") before the command to
407 execute at the
408 .Em command:
409 prompt.  Additionally, the user may direct the contents of the edit buffer
410 out to a shell operation (via a pipe) by using the left angle bracket
411 (">"), followed by a "!" and the shell command to execute.  The output of
412 a shell operation can also be directed into the edit buffer by using a
413 right angle bracket ("<") before the exclamation mark.  These can even be
414 used together to send output to a shell operation and read back the
415 results into the editor.  So, if the editor contained a list of words
416 to be sorted, they could be sorted by typing the following at the command
417 prompt:
418 .Dl ><!sort
419 This would send the contents of the editor to be piped into the
420 .Xr sort 1
421 utility and the result would be placed into the edit buffer at the current
422 cursor location.  The old information would have to be deleted by the user.
423 .Ss "Initializing ee from a file"
424 Since different users have different preferences,
425 .Nm
426 allows some
427 slight configurability.  There are three possible locations for an
428 initialization file for
429 .Nm :
430 the file
431 .Pa /usr/share/misc/init.ee ,
432 the file
433 .Pa .init.ee
434 in the user's home directory, or the file
435 .Pa .init.ee
436 in the current directory (if different from the home
437 directory).  This allows system administrators to set some preferences for
438 the users on a system-wide basis (for example, the
439 .Em print
440 command),
441 and the user to customize settings for particular directories (like one
442 for correspondence, and a different directory for programming).
443 .Pp
444 The file
445 .Pa /usr/share/misc/init.ee
446 is read first, then
447 .Pa $HOME/.init.ee ,
448 then
449 .Pa .init.ee ,
450 with the settings specified by the
451 most recent file read taking precedence.
452 .Pp
453 The following items may be entered in the initialization file:
454 .Bl -tag -width indent
455 .It case
456 Set searches to be case sensitive.
457 .It nocase
458 Set searches to be insensitive to case (default).
459 .It expand
460 Cause
461 .Nm
462 to expand tabs to spaces (default).
463 .It noexpand
464 Cause
465 .Nm
466 to insert tabs as a single character.
467 .It info
468 A small information window is displayed at the top of the terminal
469 (default).
470 .It noinfo
471 Turn off the display of the information window.
472 .It margins
473 Cause
474 .Nm
475 to truncate lines at the right margin when the
476 cursor passes beyond the right margin as set by the user
477 while text is being inserted
478 (default).
479 .It nomargins
480 Allow lines to extend beyond the right margin.
481 .It autoformat
482 Cause
483 .Nm
484 to automatically try to format the current paragraph while
485 text insertion is occurring.
486 .It noautoformat
487 Turn off automatic paragraph formatting (default).
488 .It printcommand
489 Allow the setting of the print command (default: "lp").
490 .It rightmargin
491 The user can select a value for the right margin (the first column on the
492 screen is zero).
493 .It highlight
494 Turn on highlighting of border of information window and menus (default).
495 .It nohighlight
496 Turn off highlighting of border of information window and menus.
497 .It eightbit
498 Turn on display of eight bit characters.
499 .It noeightbit
500 Turn off display of eight bit characters (they are displayed as their decimal
501 value inside angle brackets, e.g., "<220>").
502 .It 16bit
503 Turns on handling of 16-bit characters.
504 .It no16bit
505 Turns off handling of 16-bit characters.
506 .It emacs
507 Turns on emacs key bindings.
508 .It noemacs
509 Turns off emacs key bindings.
510 .El
511 .Ss "Save Editor Configuration"
512 When using this entry from the
513 .Em settings
514 menu, the user may choose to save the current configuration of
515 the editor (see
516 .Sx Initializing ee from a file
517 above) to a file named
518 .Pa .init.ee
519 in the current directory or the user's home directory.  If a file named
520 .Pa .init.ee
521 already exists, it will be renamed
522 .Pa .init.ee.old .
523 .Sh CAVEATS
524 THIS MATERIAL IS PROVIDED "AS IS".  THERE ARE
525 NO WARRANTIES OF ANY KIND WITH REGARD TO THIS
526 MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE
527 IMPLIED WARRANTIES OF MERCHANTABILITY AND
528 FITNESS FOR A PARTICULAR PURPOSE.  Neither
529 Hewlett-Packard nor Hugh Mahon shall be liable
530 for errors contained herein, nor for
531 incidental or consequential damages in
532 connection with the furnishing, performance or
533 use of this material.  Neither Hewlett-Packard
534 nor Hugh Mahon assumes any responsibility for
535 the use or reliability of this software or
536 documentation.  This software and
537 documentation is totally UNSUPPORTED.  There
538 is no support contract available.  Hewlett-Packard
539 has done NO Quality Assurance on ANY
540 of the program or documentation.  You may find
541 the quality of the materials inferior to
542 supported materials.
543 .Pp
544 Always make a copy of files that cannot be easily reproduced before
545 editing.  Save files early, and save often.
546 .Ss "International Code Set Support"
547 .Nm Ee
548 supports single-byte character code sets (eight-bit clean), or the
549 Chinese Big-5 code set.  (Other multi-byte code sets may function, but the
550 reason Big-5 works is that a two-byte character also takes up two columns on
551 the screen.)
552 .Sh WARNINGS
553 The automatic paragraph formatting operation
554 may be too slow for slower systems.
555 .Sh FILES
556 .Bl -tag -width /usr/share/misc/init.ee -compact
557 .It Pa /usr/share/misc/init.ee
558 .It Pa $HOME/.init.ee
559 .It Pa .init.ee
560 .El
561 .Sh AUTHORS
562 The software
563 .Nm
564 was developed by
565 .An Hugh Mahon .
566 .Pp
567 This software and documentation contains
568 proprietary information which is protected by
569 copyright.  All rights are reserved.
570 .Pp
571 Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996 Hugh Mahon.
572 .Sh "SEE ALSO"
573 .Xr ispell 1 ,
574 .Xr lpr 1 ,
575 .Xr spell 1 ,
576 .Xr termcap 5 ,
577 .Xr terminfo 5 ,
578 .Xr environ 7