I'm pretty sure there's a real bug somewhere deep inside of Ubuntu
(maybe some system wide thing like termcap or whatever it's called)
causing this behavior. I've used Ubuntu's Vim packages for years, always
getting annoyed about the described bug.

1. I've created ~/.vimrc, it's nonempty and it's readable.

2. I always start Vim using the "vim" executable (hard link, symlink,
whatever), never as "vi".

3. I've verified that, when the bug occurs, ":set compatible?" prints
"set nocompatible".

4. The bug occurs when running Vim in either gnome-terminal or xterm
(this is why it seems to be a system wide problem to me).

5. Recently I've started compiling Vim 7.3 based on the Mercurial
repository at https://vim.googlecode.com/hg/ and even these builds
exhibit the same exact problem.

6. I've found a workaround, though I still don't understand how the hell
it works after using it for several months:

Add the following lines to your ~/.vimrc script:

if $TERM =~ 'xterm\|screen'
  " None of the cursor keys work out of the box in Vim while in insert mode
  " using gnome-terminal/xterm but once I manually fix <Up> the other cursor
  " keys start working magically?!
  imap <Esc>[A <Up>
endif

One last thing, I'm still running Ubuntu 9.10 (Karmic) so can't confirm
whether this problem still exists for newer releases.

-- 
Using arrow keys in vim-tiny while in Insert mode introduces A,B,C,D into text
https://bugs.launchpad.net/bugs/491615
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to