Friday, June 1, 2012

Re: Scrolling with mouse in Vim GUI: is it possible to limit the number of screen lines shown after the EOF?

On 01/06/12 12:09, Alexey wrote:
> Hello,
>
> is it possible to limit (say to 3) the number of empty lines shown after the EOF when scrolling down with a mouse in Vim GUI?
>
> 'scrolloff' has no effect here.
>
> I think it can save a few "mouse strokes" when scrolling to end of file and then having to return.
>
> Thanks,
>
> Alexey.
>


I think mouse scrolling in gvim is set so you can scroll until the last
line in the file is at the top of the window; however if you want to
scroll from wherever you are to until the last line in the file is at
the _bottom_ of the window (assuming of course that the file is longer
than the window), just hit ggG at the keyboard (or even just G if the
bottom line is not currently visible). (This will also place the cursor
on the last line.)

You may want to map this to something which you normally don't use:

map <F2> ggG
imap <F2> <C-O>gg<C-O>G


Best regards,
Tony.
--
The Roman Rule
The one who says it cannot be done should never interrupt the
one who is doing it.

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

No comments: