This document is a quick introduction to NE, a full screen text
editor for Unix. Complete information about its features is found in
the manual
"NE: A Nice Editor"
by Sebastiano Vigna. You may obtain a full
copy of the manual by typing a2ps -P3hole
/usr/local/doc/ne/ne.ps
on the command
line.
In this document, references to special keys such as the Ctrl (Control) key and the Esc (Escape) key are made by placing the key name in square brackets, e.g., [Ctrl] or [Esc]. When [Ctrl] is to be used with another key, such as Z, the the sequence will be referenced by the symbol [Ctrl]Z. This means that the Ctrl key is held down while pressing the Z key and then releasing both keys.
You can create a new file and name it simultaneously by typing "ne" at the default prompt followed by the name of the file you wish to create. For example, if you wish to create a file called "project.dat", simply type "ne project.dat" on the command line. A warning will appear on the initial screen that the file does not currently exist, but will disappear as soon as you begin typing.
To edit an existing file, type "ne filename.ext" at the default prompt where "filename.ext" represents the name of the file you wish to edit.
Note: You must have permission to write in the directory where you are attempting to create the file, i.e., you cannot create the file in a public-access directory such as /usr/local, but you can create a file in your own directory.
To save your edited file and exit, first press [Ctrl]S. If the file has not been named, ne will prompt you for the name of a file. Type the name on the command line and press the [Return] key. Your changes will be saved in the named file. Then, press [Ctrl]Q to leave the editor.
To exit the editor without saving changes, press [Ctrl]Q. If you have made changes in the file, ne will ask if you wish to exit without saving the changes. If you wish to proceed, type "y". Otherwise, press the return key and you will be returned to the editor.
L: 48 C: 1 i w pvu t * foo.txt
The next sequence of letters shows special features which are turned on:
An asterisk (*) shows that the file has been changed since it was last saved.
The last entry gives the name of the file currently being edited (blank if ne was opened without specifying a file name), here "foo.txt".
From time to time, the Status Line will be overwritten with messages. It will be restored when you begin editing again.
You may use "accelerator keys" to carry out many tasks without accessing the menu. These sequences are displayed next to the items in the menu. For instance, ^Y means to press the [Ctrl] and Y key simultaneously. Similarly, ]Y means to press [Alt] and Y simultaneously. The action taken will depend on whether the [Ctrl] or [Alt] key is used. [Ctrl]Y will delete the current line regardless of the cursor location within the line, while [Alt]Y will delete from the cursor location to the end of the line. Still other commands are accessed by using function keys (e.g., F10 brings up the Help Menu). A list of the accelerator key sequences and their actions appears in the Appendix.
To turn the menu off without performing any action, press [F1] or [Esc] again.
You may also use a command line rather than the menu. Each item in the menu corresponds to a command which you can type in full or use a default abbreviation. To bring up the command line, press [Ctrl]K. Then type the name of the command you wish to execute. For instance, [Ctrl]K followed by typing the word "save" will save your edited file under the name given on the status line. Not all menu items have accelerator sequences, but they can be accessed by using the command line. The Appendix also includes a list of the command abbreviations which can be used with [Ctrl]K for most of the commonly used actions. There are also commands which are not listed in the menu. These are given in the full manual.
To enter text in the file, first postion the cursor at the appropriate spot and then begin typing. If you wish to overstrike existing text, select the Insert option from the Prefs menu. This option "toggles" the insert mode, i.e., if you are in insert mode, it changes your editing to overstrike mode, and vice versa.
To delete existing text, move to the right of the text you wish to remove and press the Delete key (on some keyboards, you may have to use the Backspace key).
You may cut or copy blocks of text by following these steps.
To replace a string of text, first find the string. Then press [Ctrl]R and enter the string which you wish to substitute. The following line will appear:
Replace (Yes/No/Last/All/Quit/Backward): n
The options are:
[Ctrl] Seq Description Command Name Abbrev.
^A Move to beginning of line MoveSOL SOL
^B Begin marking block (toggle) Mark M
^C Copy block Copy C
^D Open new document OpenNew ON
^E End of Line MoveEOL EOL
^F Find Find F
^G Repeat last RepeatLast RL
^H Backspace (delete to left of cursor)BackSpace BS
^I Tab - -
^J Go to line GotoLine GL
^K Exec (give command line) Exec EX
^L Refresh screen Refresh REF
^M (return key) - -
^N Next page NextPage NP
^O Open existing document Open O
^P Previous page PrevPage PP
^Q Quit file, closing document Quit Q
^R Replace Replace R
^S Save current document Save S
^T Start/stop recording macro Record R
^U Undelete line UndelLine UL
^V Paste selection Paste P
^W Paste vertical selection PasteVert PV
^X Cut block Cut CU
^Y Delete line DeleteLine DL
^Z Suspend Suspend SU
^@ Mark column (toggle) MarkVert MV
[Alt] Seq Description Command Name Abbrev.
[A Move to Beginning of Document Start of File SOF
[B Move to Previous Word Previous Word PW
[C Shift Text visible vert/hor Adjust View AV
[D Switch to Next Document in List Next Document ND
[E Move to End of Document End of File EOF
[F Move to Next Word Next Word NW
[G Move to current mark Go to BookMark GB
[I Sets Auto Indent Flag Auto Indent AI
[J Move Cursor to Column # Go to Column GC
[K Set mark at current position Set Bookmark M
[L Lower case To Lower TL
[M Play macro once Play Once PL
[N New Document Open New N
[O Open file as clip Open Clip OC
[P Format paragraph Paragraph PA
[Q Close document and exit (no save) Quit Q
[R Redo last action Redo RE
[S Save clip on filename Save Clip SC
[T Ask Shell to execute command Through T
[U Undo last action Undo U
[V Upper Case To Upper TU
[W Set word wrap flag Word Wrap WR
[X Save document, close, and exit Exit X
[Y Delete from cursor to end of line Delete EOL DE
[Z Set CR/LF flag CRLF CRLF
Default function key settings:
F1 Menus
F2 Next document NextDoc ND
F3 Previous document PrevDoc PD
F4 List documents - -
F5 Undo Undo U
F6 Redo Redo RE
F7 Previous word PrevWord PW
F8 Next word NextWord NW
F9 Play once Play PL
F10 Help Help H