Loading ...
Sorry, an error occurred while loading the content.
 

Re: Two up view like in adobe reader

Expand Messages
  • Ingo Karkat
    ... I think Charles Campbell s MPage plugin is just what you want: http://mysite.verizon.net/astronaut/vim/index.html#MPAGE -- regards, ingo -- You received
    Message 1 of 5 , Nov 3, 2010
      On 03-Nov-2010 04:36, gvimk wrote:
      > Hi all,
      >
      > Is there a way to do two-up view like in Adobe Reader? If not, please
      > accept my enhancement request.
      >
      > Thanks,
      > Kal

      I think Charles Campbell's MPage plugin is just what you want:

      http://mysite.verizon.net/astronaut/vim/index.html#MPAGE

      -- regards, ingo

      --
      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
    • Milan Vancura
      ... Thank you for the link, Ingo, and for the plugin itself, Dr Chip. I tried it and basically it works. But it s done by overkill: manual window
      Message 2 of 5 , Nov 3, 2010
        > I think Charles Campbell's MPage plugin is just what you want:
        >
        > http://mysite.verizon.net/astronaut/vim/index.html#MPAGE

        Thank you for the link, Ingo, and for the plugin itself, Dr Chip.
        I tried it and basically it works. But it's done by overkill: manual window
        synchronization by its own vimscript function and calling this function as a
        part of every command moving the window. So every such command must be
        remapped. It may conflict with other remappings, it's hard to catch
        everything (for example charwise and linewise visual blocks does not work in
        mpage'd windows for me) etc.

        True support of synchronized windows would be much better. And we already have
        something very similar if not the same - in diff mode. So the only we need is a
        user interface for using that not only in diff mode but in "mpage mode" as
        well. The option in question is 'scrollbind', for example we can do:

        function SplitView()
        :vsplit
        :wincmd l
        :normal L
        :normal z+
        :wincmd h
        :windo set scrollbind
        :windo set number
        endfunction

        After calling this function the current window is split and new window is
        sync'ed with the old one. This is just the first idea, proof of the concept,
        and it has limits: there is no refresh if window size changes, lines longer
        than one screenline are not handled in any special way etc.

        As I can imagine autocommands on windowsize changed, the main problem is to
        handle display problems (like a line longer than the screenline).

        Is there anyone interested to help with improving this?


        Milan
        --
        Milan Vancura, Prague, Czech Republic, Europe

        --
        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
      • Ingo Karkat
        ... Well, what you call overkill looks like the default Vim extension mechanism (i.e. autocmds, mappings and window settings) to me ;-) I agree though,
        Message 3 of 5 , Nov 3, 2010
          On 03-Nov-2010 12:03, Milan Vancura wrote:
          >> I think Charles Campbell's MPage plugin is just what you want:
          >>
          >> http://mysite.verizon.net/astronaut/vim/index.html#MPAGE
          >
          > Thank you for the link, Ingo, and for the plugin itself, Dr Chip.
          > I tried it and basically it works. But it's done by overkill: manual window
          > synchronization by its own vimscript function and calling this function as a
          > part of every command moving the window. So every such command must be
          > remapped. It may conflict with other remappings, it's hard to catch
          > everything (for example charwise and linewise visual blocks does not work in
          > mpage'd windows for me) etc.
          >
          > True support of synchronized windows would be much better. And we already have
          > something very similar if not the same - in diff mode. So the only we need is a
          > user interface for using that not only in diff mode but in "mpage mode" as
          > well. The option in question is 'scrollbind', for example we can do:
          >
          > function SplitView()
          > :vsplit
          > :wincmd l
          > :normal L
          > :normal z+
          > :wincmd h
          > :windo set scrollbind
          > :windo set number
          > endfunction
          >
          > After calling this function the current window is split and new window is
          > sync'ed with the old one. This is just the first idea, proof of the concept,
          > and it has limits: there is no refresh if window size changes, lines longer
          > than one screenline are not handled in any special way etc.
          >
          > As I can imagine autocommands on windowsize changed, the main problem is to
          > handle display problems (like a line longer than the screenline).
          >
          > Is there anyone interested to help with improving this?

          Well, what you call "overkill" looks like the default Vim extension mechanism
          (i.e. autocmds, mappings and window settings) to me ;-)

          I agree though, having a built-in setting is the "dream state" everyone aspires
          to. For me, the current MPage implementation works fine, and the few re-mapped
          keys don't seem to interfere even with my heavy customization. (But I don't use
          it that often, so a 80:20 solution may be fine with me.)

          -- regards, ingo

          --
          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
        • Milan Vancura
          ... Yes, I like to avoid both to change basic mappings in so hard way and to script hooks called so often. I accept them in situations where we don t have
          Message 4 of 5 , Nov 5, 2010
            > >> I think Charles Campbell's MPage plugin is just what you want:
            > >>
            > >> http://mysite.verizon.net/astronaut/vim/index.html#MPAGE
            > >
            > > Thank you for the link, Ingo, and for the plugin itself, Dr Chip.
            > > I tried it and basically it works. But it's done by overkill: manual window
            > > synchronization by its own vimscript function and calling this function as a
            > > part of every command moving the window. So every such command must be
            > > remapped. It may conflict with other remappings, it's hard to catch
            > > everything (for example charwise and linewise visual blocks does not work in
            > > mpage'd windows for me) etc.
            > >
            > > True support of synchronized windows would be much better. And we already have
            > > something very similar if not the same - in diff mode. So the only we need is a
            > > user interface for using that not only in diff mode but in "mpage mode" as
            > > well. The option in question is 'scrollbind', for example we can do:
            >
            > Well, what you call "overkill" looks like the default Vim extension mechanism
            > (i.e. autocmds, mappings and window settings) to me ;-)
            >
            > I agree though, having a built-in setting is the "dream state" everyone aspires
            > to. For me, the current MPage implementation works fine, and the few re-mapped
            > keys don't seem to interfere even with my heavy customization. (But I don't use
            > it that often, so a 80:20 solution may be fine with me.)

            Yes, I like to avoid both to change basic mappings in so hard way and to script
            hooks called so often. I accept them in situations where we don't have other
            option. But this is not that case. Or, at least, I hope so :-)

            My idea is: it seems we have a chance to get this functionality by setting vim
            options ('scrollbind'). Yes, we will still need autocommands - but for the
            change of window size etc., not for the window content sync itself. Much
            better, isn't it?

            The only question is if we can get solution good enough even without any patch
            of vim. I'm not 100% sure, so I "dumped" what I know and asked the others for
            the cooperation.

            Any volunteers?

            Milan

            --
            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
          Your message has been successfully submitted and would be delivered to recipients shortly.