Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ames!haven!ncifcrf!lhc!nih-csl!helix.nih.gov!pfeifer From: pfeifer@helix.nih.gov (John Pfeifer) Newsgroups: comp.editors Subject: Re: VI Hint requested Message-ID: <743@nih-csl.nih.gov> Date: 17 Dec 90 13:40:18 GMT References: <1990Dec17.003156.28032@informix.com> Sender: news@nih-csl.nih.gov Reply-To: pfeifer@helix.nih.gov (John Pfeifer) Organization: alw.nih.gov (Natl. Institutes of Health, Bethesda, MD) Lines: 38 In article <1990Dec17.003156.28032@informix.com>, billd@infmx.informix.com (William Daul) writes: |> USING VI.... |> |> 1. Given a number of lines that looked like this: |> |> one two three four five six |> |> How would I create a file that looked like this from the above: |> |> one |> two |> three |> four |> five |> six Easy enough - :%s/\ /^V/g (^V == crtl-V, == return) |> 2. What if the lines looked like this: |> |> one two three four |> one two three four |> one two three four Ok, do the same as above and then - :g /^&/ d (in this case, ^ is the carret character) If you want to be techincal, these are ex commands. -John -- #include John Pfeifer internet: pfeifer@alw.nih.gov "Jives! Jives! Clear away this rubble and bring us another tea set!" -Lady Jowls