View file File name : jed006.html Content :<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> <meta name="generator" content="hevea 2.35"> <link rel="stylesheet" type="text/css" href="jed.css"> <title>Emulating Other Editors</title> </head> <body > <a href="jed005.html"><img src="previous_motif.svg" alt="Previous"></a> <a href="index.html"><img src="contents_motif.svg" alt="Up"></a> <a href="jed007.html"><img src="next_motif.svg" alt="Next"></a> <hr> <h2 id="sec6" class="section">5 Emulating Other Editors</h2> <p><span style="font-weight:bold">jed</span>’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, <span style="font-weight:bold">jed</span> provides reasonable emulation of the Emacs, EDT, and Wordstar editors.</p> <h3 id="sec7" class="subsection">5.1 Emacs Emulation</h3> <p>Emacs Emulation is provided by the <span style="font-weight:bold">S-Lang</span> code in <code class="verb">emacs.sl</code>. The basic functionality of Emacs is emulated; most Emacs users should have no problem with <span style="font-weight:bold">jed</span>. To enable Emacs emulation in <span style="font-weight:bold">jed</span>, make sure that the line </p><pre class="verbatim"> evalfile ("emacs"); pop (): </pre><p> is in your <code class="verb">jed.rc</code> (<code class="verb">.jedrc</code>) startup file. <span style="font-weight:bold">jed</span> is distributed with this line already present in the default <code class="verb">jed.rc</code> file.</p> <h3 id="sec8" class="subsection">5.2 EDT Emulation</h3> <p>For EDT emulation, <code class="verb">edt.sl</code> must be loaded. This is accomplished by ensuring that the line</p><pre class="verbatim"> evalfile ("edt"); pop (); </pre><p>is in present in the <code class="verb">jed.rc</code> (<code class="verb">.jedrc</code>) Startup File. <span style="font-weight:bold">jed</span> is distributed with EDT emulation enabled on VMS and Unix systems but the above line is commented out in the <code class="verb">jed.rc</code> file on MS-DOS systems.</p><p>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 <code class="verb">emacs.sl</code> must be loaded before <code class="verb">edt.sl</code> is loaded.</p><p>One minor difference between <span style="font-weight:bold">jed</span>’s EDT emulation and the real EDT concerns the <span style="font-variant:small-caps">Ctrl-H</span> key. EDT normally binds this to move the cursor to the beginning of the line. However, <span style="font-weight:bold">jed</span> 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 <code class="verb">edt.sl</code> for hints. Alternatively, simply put </p><pre class="verbatim"> unsetkey ("^H"); setkey ("bol", "^H"); </pre><p> in the <code class="verb">jed.rc</code> startup file after <code class="verb">edt.sl</code> is loaded. Keep in mind that the <span style="font-variant:small-caps">Ctrl-H</span> key will no longer function as a help key if this is done.</p><p>EDT emulation for PCs only work with the enhanced keyboard. When <code class="verb">edt.sl</code> is loaded, a variable <code class="verb">NUMLOCK_IS_GOLD</code> is set which instructs <span style="font-weight:bold">jed</span> 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 <span style="font-variant:small-caps">+</span> 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 <span style="font-variant:small-caps">+</span> key to return the characters <span style="font-variant:small-caps">Esc O l</span> which <span style="font-weight:bold">jed</span> maps to the delete character function. This may be changed to the delete word function if you prefer. See the file <code class="verb">edt.sl</code> for details.</p><p>The <span style="font-variant:small-caps">GOLD</span>–<span style="font-variant:small-caps">GOLD</span> key combination toggles the keypad between application and numeric states. On the PC, this is not possible. Instead, the PC <span style="font-variant:small-caps">F1</span> key has been instructed to perform this task.</p> <h3 id="sec9" class="subsection">5.3 Wordstar Emulation</h3> <p><code class="verb">wordstar.sl</code> contains the <span style="font-weight:bold">S-Lang</span> code for <span style="font-weight:bold">jed</span>’s Wordstar emulation. Adding the line </p><pre class="verbatim"> evalfile ("wordstar"); pop (); </pre><p> to your <code class="verb">jed.rc</code> (<code class="verb">.jedrc</code>) startup file will enable <span style="font-weight:bold">jed</span>’s Wordstar emulation.</p> <hr> <a href="jed005.html"><img src="previous_motif.svg" alt="Previous"></a> <a href="index.html"><img src="contents_motif.svg" alt="Up"></a> <a href="jed007.html"><img src="next_motif.svg" alt="Next"></a> </body> </html>