PageRenderTime 26ms CodeModel.GetById 16ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/contrib/ee/ee.1

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