Monday, March 22, 2010

Re: Up/Down U and D keys work weird

Tim Chase related the following on 03/22/2010 10:57 AM:
> 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"?
>>
>
>
I believe this is one of those commands that takes a repeat number
before the command.

Further, if you type 8 C-U ALL control-U (AND control-D) key strikes
henceforth will scroll 8 lines.

From help:

CTRL-U Scroll window Upwards in the buffer. The number of
lines comes from the 'scroll' option (default: half a
screen). If [count] given, first set the 'scroll'
option to [count]. The cursor is moved the same
number of lines up in the file (if possible; when
lines wrap and when hitting the end of the file there
may be a difference). When the cursor is on the first
line of the buffer nothing happens and a beep is
produced. See also 'startofline' option.
{difference from vi: Vim scrolls 'scroll' screen
lines, instead of file lines; makes a difference when
lines wrap}


/Bill

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