Xref: utzoo comp.editors:935 comp.unix.questions:16329 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!uflorida!rex!ginosko!uunet!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.editors,comp.unix.questions Subject: Re: Centering lines in vi Message-ID: <3262@solo5.cs.vu.nl> Date: 14 Sep 89 20:15:18 GMT References: <2283@umbc3.UMBC.EDU> <1345@blackbird.afit.af.mil> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 22 hamlin@blackbird.afit.af.mil (Joe Hamlin) writes: \... The \ following \ macro seems to \ work just fine. These \ painful-to-read lines were \ centered with \ it. \ \map v $ma81a ^[81^V|D`alld0:s/ / /g^M$p^M A nice map, but it has a small bug: try to center a line that's been centered already, or any line with indentation. Furthermore, after applying the macro every line ends in a space! Let's try again: map v :s/^[ ^I]*//^V^M$ma81a ^V^[81^V^V|D`alxd0:s/ / /g^V^M$p^V^M ^^ ^^ NOT an escape this IS an escape -- creat(2) shouldn't have been create(2): |Maarten Litmaath @ VU Amsterdam: it shouldn't have existed at all. |maart@cs.vu.nl, mcvax!botter!maart