NE(1)

NAME
ne - Cambridge Text Editor

SYNOPSIS
ne [ filename ] [ -to filename ] [ -with filename ]
   [ -ver filename ]
   [ -opt commands ] [ -init commands ] [ -line ] [ -tabs ]
   [ -tabin ] [ -notabs ] [ -tabout ] [ -help ] [ -id ]

DESCRIPTION
The ne command runs the latest implementation of the Cambridge text editor which is generically known as NE, and which runs on a number of different computer systems. A full specification is available in the file NE.spec.ascii, and any recent changes made since the specification was last updated are in the file NE.changes.spec. For local Cambridge users, a printed version of the specification is available from Computing Service Sales, at a price of 3 pounds. If no file name is given in the command line, NE is entered with an empty, unnamed editing buffer. If the name of the source file is given as "-", then NE runs as a filter, taking the text to be edited from the standard input, and writing the resulting text to the standard output by default. In this case, editing commands must be specified using either or both of the -opt and -with options.

OPTIONS

-to specifies a destination for the edited file. If omitted, the edited file is written back on top of the source file, except when the source is the standard input, in which case the default is to write it to the standard output.

-with
    specifies a file of editing commands to be applied to the source file. If it is omitted, editing commands are taken from the standard input except when NE is being run as a filter.

-ver
    specifies a file to which verifications and error messages are written by NE. If it is omitted, the default is to write to the standard output, unless this is being used for the main output, in which case the standard error stream is used.

-opt
    specifies a string of editing commands to be applied at the start of editing, before reading other command input.

-init
    specifies a string of initializing commands which replace those supplied via the NEINIT environment variable.

-line
    forces NE to operate in line-by-line mode, as a line editor, instead of as a screen editor.

-tabs
    causes NE to expand tabs to spaces (at a spacing of 8) whenever an input line is read. The lines which contained tabs are identified, and when they come to be written out, NE re-inserts as many tabs as possible, except that it does not insert a tab where a single space will suffice, unless another tab follows. Note that this does not guarantee that exactly the same tabbed lines are written out as were read in. Lines which did not contain input tabs are not written out with tabs.

-tabin
    causes NE to expand tabs to spaces (at a spacing of 8) whenever an input line is read, but take no action on output.

-tabout
    causes NE to insert tabs into all output lines. As many tabs as possible are used, except that a tab is never inserted where a single space will do, unless another tab follows.

-notabs
    suppresses all tab handling. It is useful for over-riding the ETABS environment variable.

-help
    causes NE to output some basic help for its command syntax.

-id causes NE to output the current version number.

DEFAULT MODES
If both the command input and the verification output are connected to a terminal, NE runs in interactive mode. This affects the way errors are handled, and also causes prompting to occur in certain circumstances. NE starts up in screen mode as a fullscreen editor only if the -line option is not specified, and also it is running interactively with commands and verification using the standard input and output.

ENVIRONMENT
When NE starts up, it searches for the environment variable NEINIT. The contents of this variable are taken as a string of NE commands to be obeyed before the contents of the -opt string. If the environment variable ETABS is present, NE uses it to set its tab handling option as follows:
  "tabs" is equivalent to -tabs
  "in" is equivalent to -tabin
  "out" is equivalent to -tabout
  "inout" is equivalent to -tabin -tabout

SEE ALSO
Specification of the NE Text Editor , published by the University of Cambridge Computing Service. The file NE.spec.ascii contains a plain text version of the specification. The file NE.changes.spec contains details of changes to the program since the specification was last updated.