🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #2466

vi redraw, centering

#2466
From: Charles S. Harris
Date: Tue, 17 Nov 1992 04:42
25 lines
1789 bytes
   Especially at 2400 baud, I find some of vi's screen redrawing
annoying.  vi puts the cursor line in the middle of each redrawn
screen, whereas I'd prefer it to be at the top.  I can of course
move the middle line to the top with z , but that entails another
redraw.  Is there any way (macro, option, etc.) to deal with the
following four (related?) cases?:
   1. Repeated searches for a string:  If the next match is beyond
the screen, I'd like the match line to appear at the top of the
(redrawn) screen.  If the next match is on the present screen, I
want the cursor to jump to it without any redrawing.
   2. Jumping to a marked line:  If I mark a line with  mx  ,
then move to a different page and type  'm  , I'd like the marked
line to show up at the top of the screen instead of the middle.
   3. Moving too far:  If I make a big cursor movement, such as
50j , I'd like the moved-to line to show up at the top of the
screen instead of the middle.
   4. Deleting a block that starts on a previous page:  If I
mark lines with mx and my, then do  :'x,'yd  , where 'x is not
displayed in the current screen, I want the surviving line 'y+1
to be at the top of the screen rather than in the middle.
     --Charles S. Harris  (csh@ulysses.att.com)
       Creative Thinking & Diversity    (908 957-9410)
       54 Crawford Road
       Middletown, NJ  07748
Technical Details
Message-ID: <1992Nov17.044218.16228@ulysses.att.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!att!dptg!ulysses!ulysses.att.com!csh

Show Full Headers
Complete Article Headers
Newsgroups: comp.editors
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!gatech!darwin.sura.net!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!att!dptg!ulysses!ulysses.att.com!csh
From: csh@ulysses.att.com (Charles S. Harris)
Subject: vi redraw, centering
Message-ID: <1992Nov17.044218.16228@ulysses.att.com>
Date: Tue, 17 Nov 1992 04:42:18 GMT
Organization: AT&T Bell Laboratories, Murray Hill
Lines: 25