|
NAMEaee - another (easy) editorSYNOPSISaee [ options ... ] [file[s]]rae [ options ... ] file[s] xae [ options ... ] [file[s]] rxae [ options ... ] file[s] DESCRIPTIONaee and xae are non-modal editors, that is, the user does not need to switch from one mode to another to insert and delete text. The editor is always in text mode. Control sequences and function keys are used to perform the editing functions. In the case of xae, the mouse can also be used to position the cursor, and perform text selection and pasting.rae and rxae are the same as aee and xae respectively, except that they are restricted to editing the file(s) named on the invoking command line. No other files may be opened or written, nor may shell operations be performed. The arrow keys (up, down, left, right) may be used to move the cursor. If the keyboard is so equipped, the prev and next keys will move the cursor to the previous and next pages, respectively. The gold key is a key that is used to provide alternate behavior for a key, much like a gold function key on a calculator keyboard. So, for example, function key number 7 (f7) may be used for initiating a search, while pressing the gold key and then f7 will produce a prompt for the string to be searched for. The gold function can be assigned to any assignable key. By default, the keys f1 and control-g (^g) are assigned the gold function. The rest of the keys by default will behave as described below. OPTIONSThe following are accepted as options when starting aee or xae:
The following additional options are available for xae only:
The xae specific options may be specified in the X-Windows Version 11 defaults file for the user. See your X-Windows documentation for more details. Function Keysaee uses the terminal's function keys to perform editing tasks. By default, only keys f1 through f8 are defined. (Although a terminal may have function keys, the keys may not send unique sequences that can be recognized by software, or may require particular settings in order to be useful. If in doubt, ask your system administrator.)
Control KeysControl keys are the regular alphabetic keys pressed in conjunction with the control key (sometimes spelled CTRL). To press control-a (also noted as ^a), first press control, then press 'a', so that both keys are pressed at the same time.
Menu OperationsPop-up menus can be obtained by pressing the escape key (or ^[ if no escape key is present). When in the menu, the escape key can be used to leave the menu without performing any operations. Use the up and down arrow keys, ^u and ^d or the space or backspace keys to move to the desired items in the menu, then press return to perform the indicated task.The main menu in aee is as follows:
CommandsSome operations require more input than one key can provide, or do not need to be so easily accessed. These commands are entered using the prompt provided by pressing the command (^E or ^C or gold f8) key. The line commands are:
Search and Replaceaee's search facility provides several abilities. The user may choose for the search to be case sensitive, or ignore the case (upper or lower) of a character (nocase is the default). The user may also choose literal, or noliteral (the default) modes for the search facility. The literal mode interprets the search string literally, noliteral means that some characters (called metacharacters) have special meaning, as described below:
The carat (^) within the square brackets ([]) means that the search will match any characters not within the brackets. The carat must be the first character after the opening bracket. The asterisk (*) may be useful when searching for a string to which you know the beginning and end, but not what characters (if any) or how many may be in the middle. The first character after the asterisk should not be a metacharacter (a character with special meaning). The replace facility uses the same modes as the search facility. The prompt for the replace operation shows the syntax for the input: /string1/string2/
where the slash ('/') may be replaced by any character that is not in the search or replacement string, and "string1" is to be replaced by "string2". When in noliteral mode, the search string may be placed in the replacement string by using the ampersand ('&'), like so: /old/abc&123/
Where "old" will be inserted between "abc" and "123". RecoveryIf for some reason an edit session is interrupted, it is possible to recover the work done in the session. This is accomplished via the information stored in the journal file, which is a record of the changes made to the text in the buffer while in the editor. To recover a session in which a file named foo was being edited, use the command:aee -r foo This is only possible if the -j option was not used, since the -j option turns journaling off. It is also possible to start aee with no arguments, and then to browse the journal files. This is accomplished through the menus. To perform this task, bring up the menu by pressing the Esc key, select file operations, then select recover from journal. You should then be presented with a list of files to recover. Key DefinitionsThe function keys and control sequences (alphabetic keys pressed with the control key) may be defined by the user to perform any of the functions described below.The user may assign more than one function to each key, as long as each one is separated by one or more spaces. The following describes the functions of the keys and how the user may redefine the keyboard during the edit session on the command line. The same syntax is used in the initialization file. Note that the '^' is typed by the user in the following examples, and is not generated by pressing the control key and letter, and that f2 is entered by typing an 'f' and then a '2'. Examples:
define ^b dl will define the key control b to have the function delete line. define gold ^b udl assigns the function undelete line to GOLD control b. define f2 /this is an inserted string/ cr will cause the string between the delimiters (/) to be inserted followed by a carriage-return whenever the function key f2 is pressed. If you wish to have a key that deletes to the end of line without appending the next line to the end, you may make the following key definition: define f3 dl cr left This set of functions will delete to the end of line and append the next to the end of the line, then insert a line at the cursor, and then move the cursor back to the end of the previous line, the position where you started. This may of course be assigned to any valid key. SymbolsThe following symbols, as well as the commands noted by (‡) in the list of commands may be assigned to keys using the define command.
Initializing aee From A Fileaee checks for a file named init.ae in /usr/local/share/aee, .init.ae in the user's home directory, then for .init.ae in the current directory. (This file may be created manually or by using the menu entry 'save editor config' in the 'settings' menu.) If the file exists, it is read and initializes aee to the parameters as defined in the file. By having initialization files in multiple places, the user may specify settings for global use, and then supplement these with customization for the local directory. The parameters allowed in the init.ae file are key definitions, turning off windowing, case sensitivity, literal searching, eight bit characters, as well as the ability to echo strings to the terminal (see the Commands section for the commands allowed in the initialization file). An example follows:define ^z rp define gold ^z prp define f3 und define f4 unmark define k0 srch define gold k0 psrch case printcommand lp -dlaser echo \033&jB The above example assigns the command replace to control-z, and replace prompt to gold control-z, as well as setting aee to be sensitive to the case of characters during search and replacement operations. It also defines the function keys f3 and f4 to be undelete and unmark respectively. The print command will send its output to the device 'laser' through the UNIX command lp. A string is echoed to the terminal which will "turn on" the user function keys on an HP terminal. The user may wish to echo strings to the terminal when starting aee to set up the terminal or other devices, so the echo facility is provided. Echo is applicable only in the initialization file. No quotes are required around the string to be echoed. Characters may be literal or escaped (using the backslash convention). The -e option on the invoking command line turns off the echo operation. This may be useful if you normally use one type of terminal (and echo strings for its use), but occasionally use another terminal and do not wish the strings to be echoed. Operations allowed in the initialization file are noted in the list of commands with an asterisk (*). Shell EscapesSometimes it is desirable to execute shell commands outside of the editor. This may be accomplished by pressing a key assigned to the command function (^E, or gold F8), and then entering an exclamation mark (!) followed by the shell command(s) to be executed. It is possible to send data from the editor to be processed by a shell command and/or read data from a shell command into a buffer in the editor. The format for this is as follows:<inbuff >outbuff !command where inbuff is the name of the buffer to receive the data and outbuff is the name of the buffer to output to the shell command. By omitting the name of the buffer, the current buffer will be used. For example, if you have a list of names and wish them sorted, you could use the UNIX command sort. If you wished to view them while in the current edit session, you could use the following sequence: <sorted >list !sort where list is the name of the buffer containing the unsorted list, sorted is the name of the buffer to contain the sorted list, and sort is the name of the UNIX command to be executed. The data read in from the command will be placed after the current cursor location in the receiving buffer. If the specified buffer does not exist when the command is entered, it will be created. You should be sure of the spelling of the name of the buffer to be the input of the command if you are specifying one. PRINT CommandThe print command allows you to send the contents of the current buffer to a command specified by using the printcommand operation in the initialization file. The default is 'lp', using the default device.If you choose to specify something other than the default command, the command should be able to take its input from stdin, since aee will set up a pipe to feed the information to the command. Paragraph FormattingParagraphs are defined for aee by a block of text bounded by:
A paragraph may be formatted two ways: explicitly by choosing the format paragraph menu item, or by setting aee to automatically format paragraphs. The automatic mode may be set via a menu, or via the initialization file. There are three states for text operation in aee: free-form, wrap, and automatic formatting. "Free-form" is best used for things like programming. There are no restrictions on the length of lines, and no formatting takes place. Margins are not enabled for this state. "Wrap" allows the user to type in text without having to worry about going beyond the right margin (the right and left margins may be set in the settings menu, the default is for the right margin to be the right edge of the terminal). This is the mode that allows the format paragraph menu item to work. The "observe margins" entry in the "settings" menu allows the user to toggle this state, as well as the margin and nomargin commands (see Commands above). "Automatic formatting" provides word-processor-like behavior. The user may type in text, while aee will make sure the entire paragraph fits within the margins every time the user inserts a space after typing or deleting text. Margins must also be enabled in order for automatic formatting to occur. The "auto paragraph format" item in the "settings" menu allows the user to toggle this state, as well as the commands autoformat and noautoformat. ModesAlthough aee is a 'modeless' editor (it is in text insertion mode all the time), there are modes in some of the things it does. These include:
You may set these modes via the initialization file (see above), with a menu (see Menu above), or via commands (see Commands above). Mark, Cut, Copy, and PasteTo move large chunks of text around, use the control key commands mark (^U or f6), cut (^X or f7), and paste (gold ^V or gold f7). These commands allow you to mark the text you wish to use so that it may be put in the paste buffer. The paste buffer differs from the buffers mentioned below in that you may not move to it, and that it is only used for these operations. Once the text has been placed in the paste buffer, you may move your cursor wherever you wish and insert the text there, as many times you wish, anywhere you want.Simply move the cursor to the start of a section of text you wish to mark, and press the key assigned the control key function mark (^U or f6). Move the cursor over the text you wish to place in the paste buffer. The text between the cursor position at which you pressed the mark key and the current position will be highlighted. Once you have marked all of the text you wish to place in the paste buffer, press the key for cut (^X or f7) or copy (^C or gold f6). The cut operation deletes the text from the buffer in which the text is contained, and the copy operation simply places the text in the paste buffer without deleting it. Now you may move to another section and use the paste function to insert it as many times as you wish. If you wish to copy several sections of text that are not adjacent to each other, you may use the append function (gold ^B) to put the text you will mark at the end of the current paste buffer contents, or the prefix function (gold ^D) to place the newly marked text before the current paste buffer contents when you copy or cut. The prefix and append functions are used in place of the mark function. Sometimes you may start marking text, then decide to cancel the operation. It is possible to do that by using the unmark operation. The unmark operation is not assigned to any key by default. Buffer Operationsaee allows you to examine more than one file in the editor during one edit session. This mechanism is known as buffers, and the first buffer is called main. Buffers may or may not be viewed simultaneously on the screen depending upon the wishes of the user. The default condition allows for the buffers to co-exist on the screen, but this may be changed by using the command nowindows. To return to the default condition, enter the command windows, and buffers will co-exist on the screen. You may switch between having windows and not having windows at any time without losing information in the buffers. aee will remind you that you have buffers if you attempt to leave the editor without deleting them.Buffers are created when you enter the command buffer with a single argument, which is used as the buffer's name. This command not only creates the new buffer, but it moves the cursor to the new buffer. This is also the way to move to a buffer which already exists. Buffer movement is also facilitated by the control key commands nb (gold ^N) and pb (gold ^P), short for next buffer and previous buffer. This is especially useful if you mistype or forget the name of any of the buffers you have created and have windowing turned off. The command buffer without any arguments displays the name of the current buffer. Buffers can be deleted by using the command delete. Simply move to the buffer to be deleted and use the command delete. You cannot delete the first buffer, called main. Note that all commands operate in the buffer in which your cursor is operating, so you may use the write and read commands to save or read a file into the current buffer. On-Line HelpOn-line help is provided through the 'help' command or menu item. This command uses a file with help information. By default the help file is located in /usr/local/share/aee/help.ae, but this file may be located in the user's home directory with the name .help.ae, or in the current directory with the name help.ae.WARNINGSA journal file will not be created if the user does not have write permission to the directory in which the file is to reside.If the file to edit does not exist, and is to be created in a directory to which the user does not have write permission, aee will exit with an error without editing the file. The automatic paragraph formatting operation may be too slow for slower systems. Writing the information to the journal during some operations may be rather disk I/O intensive, which may impact performance noticably on slower systems. Journal files may also grow considerably during an edit session, which may be a concern if there is little disk space available. Turning off journaling may be useful if performance is slow, but turning off journaling will mean the loss of data should a system or network failure occur while using the editor. CAVEATSTHIS MATERIAL IS PROVIDED "AS IS". THERE ARE NO WARRANTIES OF ANY KIND WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Neither Hewlett-Packard nor Hugh Mahon shall be liable for errors contained herein, nor for incidental or consequential damages in connection with the furnishing, performance or use of this material. Neither Hewlett-Packard nor Hugh Mahon assumes any responsibility for the use or reliability of this software or documentation. This software and documentation is totally UNSUPPORTED. There is no support contract available. Hewlett-Packard has done NO Quality Assurance on ANY of the program or documentation. You may find the quality of the materials inferior to supported materials.Always make a copy of files that cannot be easily reproduced before editing. Save files early, and save often. FILES/usr/local/share/aee/init.ae$HOME/.aeeinfo $HOME/.init.ae .init.ae AUTHORThe software aee and xae was developed by Hugh Mahon.This software and documentation contains proprietary information which is protected by copyright. All rights are reserved. Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2002 portions Hugh Mahon and portions Hewlett-Packard Company. Visit the GSP FreeBSD Man Page Interface. |