On Mon, Dec 22, 2008 at 5:14 PM, Tom Link <micat...@gmail.com> wrote: > >> Try ":vsplit" followed by adjusting the views (e.g. PgDn in one of the >> windows), and then ":setlocal scrollbind" in both windows. > > I tried to wrap this up in a function. Unfortunately it doesn't seem > to work properly. The windows always get out of sync: > > function! reader#Reader() > let top = line('w$') + 1 > > wincmd v > exec 'norm! '. top .'ztM' > setlocal scrollbind > > wincmd p > setlocal scrollbind > endf > > Do you have an idea how to make this work?
Thanks a lot for your answer. I am really sorry for replying this late because you tried to help me promptly. I tried this and I got exactly the same thing in both windows after :setlocal scrollbind, which is what is supposed to happen anyway. Anyway, I think I can do with vsplit... What I really wanted to have was the illusion that I had a big vertical monitor and not a wide screen when scrolling windows. Thus if each number form the following list were pages say in a C program: 1 2 3 4 4 5 6 I really wish I could get this in my wide-screen monitor: 23 And if I scrolled a little (in only one of the windows) I could eventually get 34 or 56 I don't know if this is possible. It would really be useful for today's laptop with wide-screens when programming. Thanks again. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---