Hi, Kerneels Roos wrote: > Hi, where should questions like the below be posted? I realize it's > not a dev question, but for some reason I can't post to the vim use group.
yes, vim_use would be the preferred group. > -------- Original Message -------- > Subject: Auto centering cursor when at top or bottom line > Date: Wed, 03 Aug 2011 12:11:54 +0200 > From: Kerneels Roos <kerne...@gmail.com> > To: vim_...@googlegroups.com > > Is there a simple way to always have the view port shifted up or down so > that the cursor moves to the center of the screen (vertically) whenever > you reach the top most, or bottom most visible line? try a combination of scrolljump and scrolloff: set scrolljump=-50 set scrolloff=1 This will scroll as soon as the cursor enters the top or bottom line. > What I'm looking for is a global setting or script that would > immediately shift the visible text vertically so that the line > containing the cursor is vertically centered the moment you move the > cursor vertically off the screen. If you want only want to scroll when the cursor would leave the visible part, keep scrolloff at its default value of 0: set scrolljump=-50 set scrolloff=0 Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) -- You received this message from the "vim_dev" 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