Previous Up Next

5 Emulating Other Editors

jed’s ability to create new functions using the S–Lang programming language as well as allowing the user to choose key bindings, makes the emulation of other editors possible. Currently, jed provides reasonable emulation of the Emacs, EDT, and Wordstar editors.

5.1 Emacs Emulation

Emacs Emulation is provided by the S-Lang code in emacs.sl. The basic functionality of Emacs is emulated; most Emacs users should have no problem with jed. To enable Emacs emulation in jed, make sure that the line

      evalfile ("emacs"); pop ():

is in your jed.rc (.jedrc) startup file. jed is distributed with this line already present in the default jed.rc file.

5.2 EDT Emulation

For EDT emulation, edt.sl must be loaded. This is accomplished by ensuring that the line

      evalfile ("edt"); pop ();

is in present in the jed.rc (.jedrc) Startup File. jed is distributed with EDT emulation enabled on VMS and Unix systems but the above line is commented out in the jed.rc file on MS-DOS systems.

This emulation provides a near identical emulation of the EDT keypad key commands. In addition, the smaller keypad on the newer DEC terminals is also setup. It is possible to have both EDT and Emacs emulation at the same time. The only restriction is that emacs.sl must be loaded before edt.sl is loaded.

One minor difference between jed’s EDT emulation and the real EDT concerns the Ctrl-H key. EDT normally binds this to move the cursor to the beginning of the line. However, jed uses it as a help key. Nevertheless, it is possible to re-bind it. See the section on re-binding keys as well as the file edt.sl for hints. Alternatively, simply put

      unsetkey ("^H"); setkey ("bol", "^H");

in the jed.rc startup file after edt.sl is loaded. Keep in mind that the Ctrl-H key will no longer function as a help key if this is done.

EDT emulation for PCs only work with the enhanced keyboard. When edt.sl is loaded, a variable NUMLOCK_IS_GOLD is set which instructs jed to interpret the Num-Lock key on the square numeric keypad to function as the EDT GOLD key. In fact, this keypad should behave exactly like the keypad on VTxxx terminals. The only other problem that remains concerns the + key on the PC keypad. This key occupies two VTxxx key positions, the minus and the comma (delete word and character) keys. Thus a decision had to be made about which key to emulate. I chose the + key to return the characters Esc O l which jed maps to the delete character function. This may be changed to the delete word function if you prefer. See the file edt.sl for details.

The GOLDGOLD key combination toggles the keypad between application and numeric states. On the PC, this is not possible. Instead, the PC F1 key has been instructed to perform this task.

5.3 Wordstar Emulation

wordstar.sl contains the S-Lang code for jed’s Wordstar emulation. Adding the line

      evalfile ("wordstar"); pop ();

to your jed.rc (.jedrc) startup file will enable jed’s Wordstar emulation.


Previous Up Next