Vim/vi scroll-margin

Gerald Combs gerald at ethereal.com
Mon Apr 25 09:59:54 CDT 2005


Is it possible to force vim/vi to not place the cursor at the bottom of
the screen when searching?  For example, if I search for "some_func()"
and match the example below, vim will more often than not place the
cursor and the first line of some_func() at the bottom of the screen.
If I want to see all of the arguments to some_func, I have to scroll
down.  Pine has a setting called "scroll-margin" that forces the cursor
into a zone <n> lines from the top and bottom of the screen.  Does vim
have something similar?

    some_func(a, really, long, list, of, arguments, that,
        spills, over, into, several, lines, and, will, likely, be,
        hidden, from, view, thereby, requiring, a, bit, of,
        scrolling);



More information about the Kclug mailing list