PREV UP NEXT ne's manual

2.3: Editing

An editor is presumably used for editing. If not, you could decide to not use ne, because it just does that---it edits. It does not play Tetris. It does not evaluate recursive functions. It does not solve your love problems. It just allows you to edit.

The design of ne makes editing extremely natural and straightforward. There is no special thing to do in order to start---I assume that if you start an editor, you want to edit, and not to give commands. Thus, just press the keys of your keyboard, and see what happens.

ne provides two ways of deleting characters, bound to the BACKSPACE (or CONTROL-H, if you have no such key) and to the DELETE key respectively. In the former case you delete the character at the left of the cursor, while in the latter you delete the character just under the cursor. This is in contrast with many UN*X editors, which for unknown reasons decide to limit your ways of destroying things---something notoriously much funnier than creating. (see also DeleteChar, and see Backspace).

If you want to delete a line, you can use the DeleteLine command, or CONTROL-Y. A very nice feature of ne is that each time a nonempty line is deleted, it is stored in a temporary buffer from which it can be undeleted via the UndelLine command, or CONTROL-U (see also DeleteLine, and see UndelLine).

If you want to copy, cut, paste or erase a block of text, you have to set a mark. This is done via the Mark command, activated by choosing the `Mark Block' item of the `Edit' menu, or by pressing CONTROL-B (=block). This command toggles the mark (puts it in the current cursors position, or remove it). Whenever the mark is set, the zone between the mark and the cursor can be cut, copied or erased. Note that by using CONTROL-@ you can set a vertical mark instead, that allows to cut exactly rectangles of text. Whenever a mark has been set, an `M' appears on the command line; a `V' appears instead if the mark is vertical. If you forget where the mark is currently, you can use the `Goto Mark' menu item of the `Search' menu in order to move to cursor over it.

When you cut or copy a block, you can save it with the `Save Clip...' menu item of the `Edit' menu. You can also load in memory a file with `Open Clip...', and paste it anywhere. All such operation act on the current clip, which is by default the clip 0. You can change the current clip number with the ClipNumber command. See ClipNumber.

One of the most noteworthy features of ne is its unlimited undo/redo capability. Each editing action is recorded, and can be played back and forth as much as you like. Undo and redo are bound to the function keys F5 and F6.

Another interesting feature is the possibility of loading an unlimited number of documents. If you activate the NewDoc command (using the `Document' menu, CONTROL-D or the command line), a new, empty document will be created. You can switch between the existing documents in memory with F2 and F3, which are bound to the PrevDoc and NextDoc commands. If you have a lot of documents, the `Select...' menu item prompts you with the list of names of currently loaded documents, and allows you to choose directly what to edit.


Contact:
vigna@dsi.unimi.it - about ne
bela@www.emerson.emory.edu - about these pages