Subject: Re: little things that bother me
To: None <>
From: Christopher Schultz <>
List: port-cobalt
Date: 02/02/2005 15:17:16
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit


> When i am ssh'd into the qube, and i am trying to edit a file in vi or
> vim, when i go into insert mode, for some reason it inserts a capital
> A when i press the up arrow, B for down, C for right, and D for left. 
> each character is inserted into a new line, and it can get quite
> annoying having to insert before the last character in a line, type it
> again, type what i need, then escape out of insert mode and delete the
> extra character

Sometimes this has to do with the terminal type that you're using. I 
know that the arrow keys typically send escape sequences to the 
terminal. If the terminal is set incorrectly, then the escape sequences 
can be interpreted incorrectly.

If you have a Linux box, you can see the escape sequences by running 
this from a terminal:

$ echo $TERM   <- tells me what terminal type I'm running
$ sleep 30     <- this just keeps the shell off you back while
                   you type some stuff

Then press UP, DOWN, RIGHT and LEFT.

This is the output that I get:


So, UP => ^[[A
DOWN => ^[[B
RIGHT => ^[[C
LEFT => ^[[D

It looks like whatever terminal type you are using is stripping-off the 
escape sequences or otherwise misinterpreting them.

You can change your terminal type by just doing

$ export TERM=<terminal type>
$ setenv TERM <terminal type>

Depending on the shell you use (export for sh/bash, setenv for csh/tcsh, 
not sure about others).

'vi' should respect your selected terminal type. My Qube is currently 
not in service, so I can't check out what happens to me, or what my 
terminal type is on the Qube.

I home that helps,

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird -