Re: Wanted editor feature: synchronized horizontal split

Shlomi Fish <shlomif-ik1l9ssToec+JF/[email protected]> Sun, 26 Sep 2010 12:49:47 +0200
Newsgroups gmane.culture.hackers.israel
Message-ID <[email protected]>
Hi Amit,

On Saturday 25 September 2010 17:01:39 Amit Aronovitch wrote:
> When reading (or editing) long textual documents, especially source code,
> you always have to compromise between viewing larger portions of the code
> at once (to get a wider context), and having reasonably sized fonts (long
> documents take long time to read, you wouldn't want to stress your eyes
> too much).
> Since code typically has a fixed, relatively short, line width, there is no
> point in stretching your window horizontally. Only vertical stretching
> helps, and you are limited by the height of your screen.
> The problem became even worse with the increased popularity of wide-screens
> (for a given screen area, you now get shorter screens, and either have to
> settle for less lines to display or strain the eyes with smaller sized
> fonts).
> 
> I think that the best way to use screen area in modern wide screens would
> be to "cut" a "virtual" tall window into two halves and have them
> displayed side by side. In other words, have a wide window for your
> editor, which is horizontally split in two halves, where lines from the
> top of the right pane scroll into the bottom of the left pane and vice
> versa.
> In Emacs I can simulate a crude version of this by carefully resizing and
> scrolling two views of the same buffer, such that the top line of the right
> view follows the bottom line of the left one
> (see screenshot in  http://dl.dropbox.com/u/6960989/horizsplit.png ), and
> then turn on "scroll-all-mode" to force synchronized scrolling.
> However:
> * It is a bit tricky to set up.
> * You loose synchronization if you try to scroll beyond the top or bottom
> of your file.
> * I would like to have a single scrollbar, cursor and status line, rather
> than two (which is confusing).
> (well, maybe there is a special emacs mode for what I want, but I do not
> know of such).
> 
> Now the question:
> Is such a feature available in your favorite editor? Do you know of a good
> editor that supports this?

It is available in Vim using the ":setlocal scrollbind" feature (tried it now 
and it works). Here is the excerpt from the Vim FAQ about it:

{{{
10.8. How do I scroll two or more buffers simultaneously?

You can set the "scrollbind" option for each of the buffer to scroll them
simultaneously.

For more information, read

    :help 'scrollbind'
    :help scroll-binding
    :help 'scrollopt'
}}}

And Vim/gvim is my favourite editor. :-)

Regards,

	Shlomi Fish

> If not - should not be hard to implement - maybe somebody already wrote
> such an extension...
> 
>     AA

-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
What Makes Software Apps High Quality -  http://shlom.in/sw-quality

<rindolf> She's a hot chick. But she smokes.
<go|dfish> She can smoke as long as she's smokin'.

Please reply to list if it's a mailing list post - http://shlom.in/reply .


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/hackers-il/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/hackers-il/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/