head 1.2; access; symbols; locks; strict; comment @.\" @; 1.2 date 2018.03.22.14.29.07; author riastradh; state Exp; branches; next 1.1; commitid vFFEduU46Jk9HsvA; 1.1 date 2000.05.06.11.44.34; author blymn; state Exp; branches; next ; desc @@ 1.2 log @Make this build. Fix mandoc warnings while here. @ text @.\" $NetBSD: edit.1,v 1.1 2000/05/06 11:44:34 blymn Exp $ .\" .\" Copyright (c) 1999 .\" Brett Lymn - blymn@@baea.com.au, brett_lymn@@yahoo.com.au .\" .\" This code is donated to The NetBSD Foundation by the author. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. The name of the Author may not be used to endorse or promote .\" products derived from this software without specific prior written .\" permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .Dd May 6, 2000 .Dt EDIT 1 .Os BSD 4 .Sh NAME .Nm edit .Nd simplified editor .Sh SYNOPSIS .Nm .Op Ar file .Sh DESCRIPTION .Nm is an editor that aims to be easy to use by providing pull down menus and by using the keyboard function keys to perform their expected functions. The menus can be accessed by pressing the ESC key, on keyboards that do not have an ESC key use control-[. Once in the menu bar the menus can be navigated by using the left/right arrows, the TAB key or the h/l keys. To select an item from the menu bar press the return key when the menu item is highlighted. This will pop down the menu for that item on the menu bar. The items in the pop down menu can be navigated by the up/down arrows, the TAB key or the j/k keys. Again, to select and item, highlight it and hit the return key. In both the menu bar and the pop down menus you can skip to a menu item by typing the start of the item name. If a selection is made from a pop down menu then the cursor is automatically returned to the edit window. A pop down menu may be closed by hitting ESC, this will return the cursor to the menu bar, hitting ESC again will return the cursor to the editing window. The options on the menu bar are as follows: .Bl -inset -offset indent .It Em File This item pops up a menu that deals with the opening and saving of files and also quitting the editor. The options in the popdown menu are: .Bl -inset -offset indent .It Em Open This will present a scrolling list of file names in the middle of the screen. A file to be opened is selected by highlighting it and hitting return. If a directory is selected then the contents of that directory are displayed in the scrolling list. The parent directory can be opened by selecting the .. entry. If the name of the file to be opened is known then typing the letters that start the name will skip to the file name starting with the letters typed. .It Em Save Write the file currently open in the editor back to the file it was read from. .It Em Save As Prompts for the name of the file to save the contents of the edit buffer to and then writes that file. .It Em Quit Exits the editor. .El .It Em Edit The menu under this item contains the commands for selection, cutting, copying and pasting blocks of text. .Bl -inset -offset indent .It Em Copy Copies the region between the marked line and the current line to the cut buffer. Whole lines are copied regardless of where the cursor is on the line at the time. .It Em Cut Copies the region between the marked line and the current line to the cut buffer and then removes the lines from the edit buffer. .It Em Paste Copy the contents of the cut buffer to the edit buffer. The lines will be inserted into the edit buffer after the line the cursor is currently on. .It Em Select Sets the mark on the current line. .El .It Em Search The menu under this item contains the functions for searching forwards and backwards through the edit buffer as well as string replacement forwards and backwards through the buffer. The items in the search pop down are: .Bl -inset -offset indent .It Em Search Forward As the name indicated, this items allows a search for a string to be performed starting at the current line and moving towards the end of the file. Note that only plain strings are searched for, regular expression searches are not supported. Selecting this item pops up a window in the middle of the screen. Within this popup there are two things, firstly a prompt for a string to search for and directly under that is a small menu. First enter the string that is to be searched for and hit return. This will activate the menu which will allow for the next occurrence of the string to be searched for or to exit the search. To change the search string hit ESC and re-enter the search string. If there are no occurrences of the search string the popup will automatically close down. .It Em Search Backward Performs the same function as .Em Search Forward but the direction of the search is from the current line towards the beginning of the file. .It Em Replace Forward Performs a search and replace of a string starting at the current line and moving towards the end of the file. Selecting this item pops up a window that has a prompt for a search string, a prompt for a replace string and a small menu. Enter the string to search for at the prompt and hit return, enter the replacement string and hit return. At this point a search for the first occurrence of the search string is performed and the menu activated. The menu can be navigated in the same manner as the top menu bar. The items in the replace popup menu are as follows: .Bl -inset -offset indent .It Em Replace Replace the searched for string with the replacement string at the current cursor position and search for the next occurrence of the search string. .It Em Replace All Replace all the remaining occurrences of the search string with the replacement string without further prompting. .It Em Skip Do not replace the search string at the current cursor position and search for the next occurrence of the search string. .It Em Done Exit the replace popup. .El .It Em Replace Backward Performs the same function as .Em Replace Forward excepting that the search direction is from the current line towards the top of the file. .El .It Em Help Provides on line help about .Nm edit . The items in the popup are: .Bl -inset -offset indent .It Em Keys Provides help information about the functions various keys do within edit. .It Em About Edit Provides the version number of .Nm edit . .El .El .Pp When the cursor is in the edit window there are various keys that can be used to navigate around or perform various functions. If the terminal has arrow keys then, termcap willing, the arrow keys will move the cursor about the screen. Text may be inserted by just typing it in. Any unrecognised control key will be ignored, currently there is no method of inserting control character sequences into the edit buffer. The keys that are recognised by edit are are listed below: .Bl -column "control-space" .It Control-[ Change to the menu bar. .It Control-Space Set the mark for a region to be cut or copied later. .It Control-b Scroll a page back towards the start of the file .It Control-c Copy the region between the marked line and the current line to the cut buffer. .It Control-d Delete the character at the cursor position. .It Control-f Scroll a page forward towards the end of the file. .It Backspace .It Control-h Delete the character to the left of the current cursor position. .It Control-l Redraw the screen. .It Control-o Open a file. .It Control-p Paste the contents of the cut buffer at the current line. .It Control-r Search for a string starting at the current line and progressing towards the start of the file. .It Control-s Search for a string starting at the current line and progressing towards the end of the file. .It Control-v Copy the region between the marked line and the current line to the cut buffer and then delete the region from the edit buffer. .It Control-w Write the contents of the edit buffer to disk. .It Control-x Exit edit. .El The following keys may either not be available on the the terminal keyboard or are not supported by the termcap entry in use: .Bl -column "Page Down" .It Del Delete the character at the cursor position. .It ESC Change to the menu bar. .It F1 Online key help. .It Page Down Scroll a page forward towards the end of the file. .It Page Up Scroll a page back towards the start of the file .El .Sh DIAGNOSTICS .Nm always exits with a 0 status. .Sh SEE ALSO .Xr termcap 5 , .Sh NOTES .Nm relies heavily on the functionality of the .Xr menus 3 library. @ 1.1 log @* Added man page * Removed dummy menu entries from menu bar * Fixed cursor so that is in the menu bar when in menu mode. @ text @d1 1 a1 1 .\" $NetBSD: menu_win.3,v 1.2 1999/11/24 12:43:19 kleink Exp $ d32 1 a32 1 .Dd May, 2000 d39 1 a39 1 .Nm d60 1 a60 1 .Bl -inset -width "Search" -offset indent d150 1 a150 1 Performs the same function as d156 2 a157 2 Provides on line help about .Nm edit . d164 1 a164 1 Provides the version number of d177 13 a189 8 .It Control-[ Change to the menu bar. .It Control-Space Set the mark for a region to be cut or copied later. .It Control-b Scroll a page back towards the start of the file .It Control-c Copy the region between the marked line and the current line to the cut buffer. .It Control-d Delete the character at the cursor position. .It Control-f Scroll a page forward towards the end of the file. d191 21 a211 15 .It Control-h Delete the character to the left of the current cursor position. .It Control-l Redraw the screen. .It Control-o Open a file. .It Control-p Paste the contents of the cut buffer at the current line. .It Control-r Search for a string starting at the current line and progressing towards the start of the file. .It Control-s Search for a string starting at the current line and progressing towards the end of the file. .It Control-v Copy the region between the marked line and the current line to the cut buffer and then delete the region from the edit buffer. .It Control-w Write the contents of the edit buffer to disk. .It Control-x Exit edit. d216 10 a225 5 .It Del Delete the character at the cursor position. .It ESC Change to the menu bar. .It F1 Online key help. .It Page Down Scroll a page forward towards the end of the file. .It Page Up Scroll a page back towards the start of the file d227 1 a227 1 .Sh RETURN VALUES d234 1 a234 1 relies heavily on the functionality of the a236 1 @