On Wednesday, 18 July 2012 16:28:29 UTC+1, Christian Brabandt wrote:
> On Wed, July 18, 2012 15:36, Patrick wrote:
> > May I direct people to this stack overflow question, which is still
> > unresolved:
> > http://stackoverflow.com/questions/9906328/vim-scroll-setting-overridden
> >
> > And especially "Update 2" of the original post.
>
>
> As the help states, the setting is always reset, when resizing the window
> (and also the Vim main frame window) and apparently also when creating
> a tab.
>
> So you need to apply some autocommands to set the option to your desired
> value, e.g (untested):
> au VimEnter,VimResized,WinEnter * set scroll=4
>
> (this is not triggered when resizing windows, so may be you need some
> CursorHold event there as well)
>
> regards,
> Christian
Ah, yes, it's at the very top of the :help scroll item too! The reason I didn't react to it before was that I thought it was related to something completely different (latexsuite).
Having looked into that, I used what it stated in the help: "If you give a count to the CTRL-U or CTRL-D command it will be used as the new value for 'scroll'."
So I simply put this in my vimrc
noremap <C-u> 4<C-u>
which makes sure the scoll will always be 4.
--
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
Thursday, July 19, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment