Loading ...
Sorry, an error occurred while loading the content.
 

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

Expand Messages
  • Alexey
    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
    Message 1 of 2 , Jun 1, 2012
      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.

      --
      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
    • Tony Mechelynck
      ... 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
      Message 2 of 2 , Jun 1, 2012
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.