🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #1387

Re: Toggle between current and prev. positions in VI

#1387
From: Sridhar Venkataraman
Date: Sat, 26 Sep 1992 20:36
27 lines
1513 bytes
sarma@rtsg.mot.com (Raja Sarma)
writes on comp.editors:

)Hi All,
)	Is it possible to toggle between two positions in VI ?
)Let me explain a bit. Say, I am on line 100 and I went to a 
)particular line XX, backwards or forwards, can I go back to 
)line 100 (after an action/no-action at XX) in one key stroke
)(say <ctrl><char> etc., ...) ?

I assume vi does equivalent of an m' (which is ideally line 1 unless a
+line is given on command line in which case '' simply beeps) when it
starts up on a file. You could redefine ' position using m' or just
assign your own mark using a-z and going to it using m[a-z]. Still
interesting is the ` (backquote). Try it until you understand what
each does. ' is for line positions and ` is for character positions.

)	Is it also possible to goto many different lines
)in the file backwards and forwards and still be able to 
)go back to line 100. 

Yes. Try looking into the definitions of ' and ` in any decent vi
manual/book.

)-- Raja

Sridhar.
Technical Details
Message-ID: <1992Sep26.203657.22230@ennews.eas.asu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!asuvax!ennews!enuxhb.eas.asu.edu!sridhar
References: <sarma.717522872@celery18>

Show Full Headers
Complete Article Headers
Newsgroups: comp.editors
Path: arc1-ca.pugleaf.net!sparky!uunet!sun-barr!cs.utexas.edu!asuvax!ennews!enuxhb.eas.asu.edu!sridhar
From: sridhar@enuxhb.eas.asu.edu (Sridhar Venkataraman)
Subject: Re: Toggle between current and prev. positions in VI
Message-ID: <1992Sep26.203657.22230@ennews.eas.asu.edu>
Sender: news@ennews.eas.asu.edu (USENET News System)
Organization: Arizona State University, Tempe AZ
References: <sarma.717522872@celery18>
Distribution: na
Date: Sat, 26 Sep 1992 20:36:57 GMT
Lines: 27