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

Raspunde prin e-mail lui