Re: vi and up/down arrow
"Richard" == Richard van Paasen <rvpaasen@dds.nl> writes:
Richard> Hi, After doing a dist-upgrade on my testing debian
Richard> distro, the up/down arrows won't work in "vi" if it is
Richard> running in an xterm ($TERM=xterm).
Richard> If I press the up/down cursor keys, vi responds with:
Richard> Usage: [[
I feel better now that everyone else is having this problem ;-) I'm
running Woody (testing).
Setting TERM to 'linux' seems to fix it.
It seems that this problem showed up when a dist-upgrade upgraded
libncurses5 a few weeks ago. My (very, very uneducated) guess is that
the newly installed xterm terminal description doesn't match some
other reality on the rest of the system, probably some reality that vi
sees.
~# dpkg -l '*curses*' | grep ^i
ii libncurses4 4.2-9 Shared libraries for terminal handling
ii libncurses5 5.2.20020112a- Shared libraries for terminal handling
ii libncurses5-de 5.2.20020112a- Developer's libraries and docs for ncurses
ii ncurses-base 5.2.20020112a- Descriptions of common terminal types
ii ncurses-bin 5.2.20020112a- Terminal-related programs and man pages
ii ncurses-term 5.2.20020112a- Additional terminal type definitions
I see other things that to me (a terminfo ignoramus) are fairly
bizzare. For example, if I use ssh from an xterm on a Solaris8 system
to my Debian/Woody system, the terminal setting (TERM=xterm) really
acts weird. Besides the vi problem above, man pages and xemacs leave
things in reverse video, and emacs and vi don't even draw the screen
right.
If I use the ssh login session to start a new xterm (after setting
DISPLAY correctly) things are better. XEmacs and emacs can use the
arrow keys, but vi can't. If I change the TERM to 'linux' in this
spawned xterm, everything is OK. I understand that the first xterm was
the Solaris one, the second one was the Linux xterm, but I expected
them both to work correctly. They are both xterm's, but are using
different terminal databases.....hmmmm?
Oh well, project for the day (after doing work that makes the pay
check) is to read up on terminfo....ugh!
Cheers!
Shyamal
Reply to: