[TUHS] screen editors

Michael Parson mparson at bl.org
Sat Jan 18 12:11:19 AEST 2020


On Thu, 9 Jan 2020, Bakul Shah wrote:
> On Jan 9, 2020, at 9:21 AM, Jon Steinhart <jon at fourwinds.com> wrote:
>>
>> It's for that reason that I hate the addition of multiple windows to vi.  I
>> already have a windowing system on my machine, and that's what I use for windows.
>> To me, the correct thing to do is to open a new desktop window to edit a new file
>> and start a new instance of vi, not to use vi to open another internal window.
>
> The Rand editor made good use of multiple windows. You could set things up so
> that two windows would scroll *in sync*. This is handy e.g. when you are looking
> at two columns or rows that far apart in the same file or in different files and
> too large so you need to scroll.

For your .vimrc:

nmap =f :vsplit<bar>wincmd l<bar>exe "norm! Ljz<c-v><cr>"<cr>:set scb<cr>:wincmd h<cr>:set scb<cr>

Don't remember where I picked that up, but this will give you two vim
windows, showing your file in both, one-screen's worth apart, with
synchronized scolling.

-- 
Michael Parson
Pflugerville, TX
KF5LGQ


More information about the TUHS mailing list