vi down arrow key not working


 
Thread Tools Search this Thread
# 1  
Old 06-27-2003
vi down arrow key not working

i am using windows nt hummingbird 7.0 host explorer telnet emulation. I have two connections to two different unix machines.
on one, the down arrow works fine in vi (it woks like the j option
on the other it looks like it is giving me a new line above
(like option O) and inserting a letter "B";
Both sessions yield "term=vt220" when i issue the :se command.
Both yield "vt220" when i echo $TERM outside of vi.
The first one is a HP-UX machine and the second one is a SunOs
machine
# 2  
Old 06-27-2003
When in insert mode in vi, you can't use the up and down arrows or you will get exactly what you mentioned. You have to hit the Esc key, and then use the arrows.

Opps, never mind - I see what you mean. HP is does allow you to move around.

Checked on Sunsolve - it's been this way for a very long time - and from reading the following from Sunsolve, I doubt they are going to change it.

Customer complaint
Quote:
The arrow keys do not function correctly while in type-over mode (type-over
mode
is entered by typing a capital R). If an arrow key is pressed while in
type-over mode vi will exit type-over mode, returning to command mode.


They are concerned that their user's (who are not experienced
computer users) will press an arrow key while in type-over mode, continue
typing, and the keys typed will be interpeted by the vi command interpeter,
allowing for the possible descruction of data. Example:

- The user enters type-over mode by typing a R.
- The user types a string of characters then presses an arrow key.
- The user does not realize that they are no longer in type-over mode
and continues to type.
- If the user types something such as "dd" they will delete the line
that the cursor is on.
- Since the users are not experienced computer users (they are
data entry operators) they may not realize what has occured
and will continue editing the data, then save the file, thus
corrupting the data file.
Work Around
Quote:
Non-experienced users should use "vedit", a front end to vi that provides the
user with the mode in the lower portion of the screen.

Last edited by RTM; 06-27-2003 at 11:33 AM..
# 3  
Old 06-27-2003
Another interesting behavior -


Customer complaint
Quote:
GNOME Terminal SOLARIS: Arrow keys broken when using INSERT mode in vi.

To Reproduce:
1] Open Gnome-terminal, vi file1 .
2] Press i to set insert mode & type .e.g. gnome.
3] Press arrow keys, the letters A/B/C/D are inserted onto a new line in the
file and user cannot position cursor using these keys.

This is not the behaviour of vi in gnome-terminal on Linux or in dtterm on
either cde or gnome on Solaris, it appears to be specific to gnome-terminal on
SOLARIS.
So if you use dtterm, you can get that function - but only if your TERM variable is set to dtterm.
 

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Arrow keys binding in AIX v5.3 - how? alex_5161 UNIX for Dummies Questions & Answers 2 12-22-2011 06:40 PM
up down arrow key and edit on command line. ekb Shell Programming and Scripting 3 12-13-2011 09:06 PM
key 'm' not working migurus UNIX for Advanced & Expert Users 3 11-22-2011 08:44 AM
Tux-HJKL as arrow keys dotancohen UNIX for Dummies Questions & Answers 2 09-01-2011 04:14 PM
Solaris 8 ssh public key authentication issue - Server refused our key aixlover Solaris 1 05-25-2011 04:07 PM
enable up arrow key to get last cmd.. abdul.irfan2 UNIX for Dummies Questions & Answers 3 12-14-2010 07:54 AM
How does BASH handle KEY BOARD "up arrow"?? nsharath Shell Programming and Scripting 1 01-27-2009 09:23 AM
SunOS 5.10 - VI Arrow keys not working ravashingravi UNIX for Dummies Questions & Answers 7 12-01-2008 10:22 AM
up arrow character alex1982 UNIX for Dummies Questions & Answers 1 10-16-2008 01:26 AM
Using arrow keys cooldude Solaris 4 06-13-2008 11:51 AM
"Front" key not working sutapanaki Solaris 0 11-12-2007 04:09 PM
Pressing backspace key simulates enter key vibhor_agarwali UNIX for Dummies Questions & Answers 2 04-19-2007 06:31 PM
How to read arrow keys on really old bash? simonb Shell Programming and Scripting 1 05-01-2006 10:27 AM
Trapping Arrow keys nageshrc Shell Programming and Scripting 1 11-30-2001 02:36 PM