Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!ll-xn!mit-eddie!uw-beaver!cornell!batcomputer!itsgw!steinmetz!uunet!mcvax!hansm From: hansm@cwi.nl (Hans Mulder) Newsgroups: comp.editors Subject: Re: Query-replace on VI Message-ID: <323@piring.cwi.nl> Date: 17 May 88 14:08:52 GMT References: <2587@geac.UUCP> <27909@yale-celray.yale.UUCP> <86@skep2.ATT.COM> <393@aiva.ed.ac.uk> <52205@sun.uucp> <408@aiva.ed.ac.uk> <653@ubu.warwick.UUCP> Organization: CWI, Amsterdam Lines: 28 In article <653@ubu.warwick.UUCP> nwho@diamond.UUCP (Nick (Alfie) Holloway) writes: >What I would like to know is what other specifiers are there that can >go on the end of a substitute command. I already know > g - global > c - query (check?) c - confirm p - print l - list With %s/// both p and l print the last line affected, with g//s/// all such lines are printed. >And a final question, how do I copy a marked section. I can move using > :`a,`bm. >(or whatever for addresses) >but if I wish to copy do I have to yank then put? The easiest to remember is :`a,`b copy . The shortest valid abbreviation for copy is co, not c: :`a,`bco. But you can save one more keystroke by using t: :`a,`bt. Copy is one of those commands for which 0 is a valid line number, indicating that you want the copy before line 1. Hans Mulder hansm@cwi.nl mcvax!hansm