How to maintain vertical splits with scrollbind in vim

scriptvim

A while ago I saw a vim script which created vertical splits for the current buffer, so that the last line of the left window was the first line of the right window.
It sets scrollbind so that what scrolls off the top of the right window, scrolls in at the bottom of the left window.

Now I can't find the script! Does anyone know it?

I set scrollbind myself, but there's niggles which I'm sure the script has smoothed over.

Dyslexic Tangent answers my question, but the page he links to has a link to the script I saw before: Charles Campbell's MultiPage.

Best Answer

Check out this vim script, it does what you want.

Also, thanks for the tip, I hadn't thought of this and it sounds like a great idea.

FYI after playing with the linked tip for a while, this is my result:

noremap <silent> <Leader>vs ggzR:<C-u>let @z=&so<CR>:set so=0 noscb<CR>:set columns=160<CR>:bo vs<CR>zRLjzt:setl scb<CR><C-w>p:setl scb<CR>:let &so=@z<CR>

It does what the tip in the link does, with the addition of moving to line 1, setting the width of the double-wide screen to 160 columns, and opening all folds. Starting anywhere but line 1 was causing me problems and folds were making things inconsistent.

Related Question