Setting terminal emulation mode, Using a .exrc file to customize command keys – HP NonStop G-Series User Manual

Page 156

Advertising
background image

also result in certain vi command keys not functioning properly. However, you can take the
following steps to ensure the correct behavior of vi:

Start the terminal session in the appropriate emulation mode.

Create a .exrc file in your home directory containing customized key mappings.

Setting Terminal Emulation Mode

The method for setting the terminal emulation mode depends on the emulation program you are
using. For example, if you are using the OutsideView emulation program, set the terminal emulation
mode to VT320:
1.

Start OutsideView

2.

Select New Session from the File menu.

3.

In the Session Settings dialog box, set Emulation: to VT320, as shown in the following figure:

With your terminal session running in VT320 mode, the vi commands should behave as described
in the rest of this appendix.

Using a .exrc File to Customize Command Keys

Because of the way vi was implemented on OSS, some of the vi command keys might not function
correctly. You can ensure that these command keys function properly by creating a .exrc file in
your home directory that contains customized key mappings. As explained under

“Customizing

Your Environment” (page 164)

, the .exrc file contains commands that are executed automatically

when you start vi. You can use map commands in .exrc to map vi functions to specific keys.
The customized key mappings you specify depend upon the terminal-emulation software you are
using.

Example 2 (page 157)

shows a .exrc file containing key mappings that works with the

OutsideView emulator. If you are using a different emulator, create an .exrc file appropriate to
that emulator.
As indicated by comments, the key mappings shown in the example provide the correct functionality
for the following command keys:

Cursor control using the arrow keys

Insert and Delete keys

Page Up and Page Down keys

156

The vi Editor

Advertising
This manual is related to the following products: