Subject: Re: Problems with vi and more??
To: Dave Roethig <>
From: David Jones <>
List: current-users
Date: 06/27/1995 16:41:18
> The vi supplied with the distribution seems to
> behave strangely when remotely logged-in
> from a X-Terminal.
> The cursor keys scramble the display.

What is the terminal type set to?

Also, are you inadvertently in the "application keypad" mode?  DEC terminals,
and xterm, have an application mode which is really a separate screen.  You
will note that when you edit a file and exit, what was on the screen before
you invoked the editor will reappear.  This is application mode.

The problem, is that in their infinite wisdom, DEC decided that the cursor
keys should send different codes when in application mode.  I see no
advantage to this, and it causes programs distress when they think they're
in the other mode.  At one time, using ^Z/fg to pause and restart vi
would scramble your keys because the terminal would leave application mode.

Try using the "do full reset" option in the xterm menu and make sure the
terminal type is "xterm".

> Also, the first line of the file is not
> displayed.  This is the same for more.

You probably have a 24-line xterm, and are setting it up for 25 lines.
By default, the xterm termcap entry specifies 66 lines.  Unless you
set your rows (rlogin will do this for you, telnet from a SunOS system
will not), you will lose the top of the screen as these tools output
66 lines, scrolling the first 42 or so.

David Jones, M.A.Sc student, Electronics Group (VLSI), University of Toronto
           email:, finger for PGP public key
         For a good time, telnet and log in as `guest'.
          Click me!