Saturday, January 23, 2016

Re: vim problems

On Sat, Jan 23, 2016 at 03:50:57PM +0300, Nikolay Aleksandrovich Pavlov wrote:
> 2016-01-23 10:32 GMT+03:00 Bob Holtzman <holtzm@cox.net>:
>
> > After using vi and vim for many years it suddenly started acting up.
> >
> > Running debian 8.2 on a thinkpad T420 w/ vim 7.4.488-7.
> >
> > On a fresh install of debian 8.2, I copied the vimrc from debian 7.9
> > and plugged it in. That may have been my mistake, however I've done
> > this before with no problem.
> >
> > In the insert mode:
> > down arrow moves the line down, replacing with a cap B.
> > up arrow gives the same result except it is replaced with a cap A.
> > left arrow, same result except it's replaced with a cap D.
> > right arrow, same as above w/ cap C.
> >
>
> ​This should have nothing to do with your vimrc except that if you used to
> set `&term` option there. You need to understand that when you press any
> key terminal sends specific sequences, and it is regular convension that
> sequences look like <Esc>…; most of time `<Esc>[.\{-}\a`. I have no idea
> why arrows may *move* the line *down* and *replace*, but it is not uncommon
> when arrow keys produce sequences like `<Esc>OA`. If &term is set to
> incorrect string Vim recognizes this as if you typed `<Esc>`, then `O`,
> then `A` which should *create* new line *above* and *write* A there.​
>
> Alternative to &term problem there may be that something (not necessary
> Vim, I have shell set up for this job) has entered or leaved keyboard
> transmit mode. This may (depends on the terminal) switch between arrow keys
> producing sequences like `<Esc>[A` and `<Esc>OA`. Problem is that terminfo
> and termcap databases one of which Vim is using contain only *one* escape
> sequence for each arrow key, thus making Vim not able to recognize arrow
> keys when terminal is in wrong mode. There is some t_ option for this which
> contains escape sequence(s) sent each time Vim takes control over the
> terminal.
>
> In any case first thing you need to do is to check that a) vimrc is not
> setting &term option and b) $TERM environment variable has correct contents
> before Vim is started.

&term doesn't appear in vimrc.

echo $TERM gives xterm. Peculiar, since I use Gnome-Terminal.

Thoughts?

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment