Monday, March 22, 2010

Re: Up/Down U and D keys work weird

James Beck wrote:
> Ever since I started using Vim (years ago), I've noticed that (very)
> infrequently, the Ctrl+u (up a half-page) and Ctrl+d (down a half-page)
> commands behave strangely. For example, right at this moment, when I press
> Ctrl+u, the page scrolls up 5 lines (instead of 25 or so). But Ctrl+d
> works like normal. Wait, now Ctrl+d is doing the same thing! It was
> working five seconds ago!
>
> So you can see why this is driving me nuts.
>
> Oooh, even more weird, it's misbehaving in ONE window, but not the other!
> Same buffer, different window. And if I press Ctrl+W, R, to switch the
> windows around, the behavior follows the window! In other words, now it's
> happening in the left window instead of the right.
>
> I've always assumed it was my terminal. But after three separate terminals
> running in Windows, CentOS, and Kubuntu, it's happening in all of them.
> What the heck key am I accidentally pressing that's putting Vim in
> "act-weird-mode"?

This doesn't sound "normal" and I can see how it would drive you
bonkers :)

Given that I've never experienced anything like this in the 10+
years I've been vimming, my first suspicion is that it's some
sort of plugin/filetype issue. A couple questions:

- does it occur in one file-type in particular or in multiple
file-types? (only with Ruby source files; only with Apache config
files, etc)

- do you have any plugins/scripts enabled? (and correspondingly,
does it ever happen if you start vim with no plugins/vimrc loaded?)

- as an off-chance, do you ever have issues with those key-chords
in other applications (such as underlining with ^U in word
processors)? You mention using Win32, CentOS, and Kubuntu, but
you don't mention whether they're in VMs or multi-boot on the
same box (and thus the same potentially flaky hardware) or if
they're each separate machines with their own hardware. I've had
keyboards where a modifier key such as ctrl/shift/alt/win/meta
was stuck and I had to slap it around to free it up. Or perhaps
if you have a snazzy "enhanced" keyboard that tries to do smart
macro-ish things with certain keystrokes.

- since the behavior follows the window focus, do you have any
WinEnter/WinLeave or Buf* events defined?


If the answers to the above questions don't help indicate
anything obvious, it might help to post your vimrc file(s) and
perhaps a dump of your $HOME/.vim directory listing ("find
~/.vim" or "dir /s/b %USERPROFILE%\vimfiles" something like that)
to see if there's anything glaringly suspicious.

-tim

--
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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

No comments: