Terminal Initialization

Speed

For best redisplay performance, it is very important to set the terminal speed:

stty 2400

Often when running the editor using TTY redisplay, the editor will actually be talking to a PTY whose speed is initialized to infinity. In reality, the terminal will be much slower, resulting in the editor's output getting way ahead of the terminal. This prevents the editor from briefly stopping redisplay to allow the terminal to catch up. This is also affected by *Scroll Redraw Ratio*, as described in Terminal Redisplay.

Capabilities

The editor reads the capabilities of the terminal (mostly the terminal control sequences) from the termcap database, according to the old Unix conventions. The "TERM" environment variable holds the type of the current terminal. The editor locates the termcap database, in order, by searching for

  • the file or data specified by the TERMCAP environment variable

  • the file specified by edi::*termcap-file*

  • the file conf:termcap

  • the file library:termcap

  • the file /etc/termcap.

A prepared termcap file is available at

http://www.mundell.ukfsn.org/nightshade/termcap

Alternatively the same file can be generated with a command such as

for f in `find /lib/terminfo/`; do infocmp -Cr `basename $f` 2> /dev/null; done > termcap

Example commands that start the editor with a TERMCAP variable are

TERMCAP=/home/ni/etc/termcap nightshade -edit

and

export TERMCAP=/home/ni/etc/termcap
nightshade -edit

The following command alters the size of the terminal from the termcap value:

stty rows height columns width