Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!eru!luth!sunic!mcsun!hp4nl!star.cs.vu.nl!maart From: maart@cs.vu.nl (Maarten Litmaath) Newsgroups: comp.editors Subject: Re: vi command does not work in macro Message-ID: <3764@solo9.cs.vu.nl> Date: 20 Oct 89 17:51:16 GMT References: <273@ssp1.idca.tds.philips.nl> <62420007@hpl-opus.HP.COM> <7036@ttidca.TTI.COM> Organization: V.U. Informatica, Amsterdam, the Netherlands Lines: 31 kevin@ttidca.TTI.COM (Kevin Carothers) writes: \... \ :map ^A ddjjjp (A) :map ^A :m+2^V^M Especially for macros `ex' commands are worth learning too. \... "Cannot put inside global/macro". Vi's implementation is sick. \ 1. This works file on single lines, but simply terribly on entire \ paragraphs. Does anyone have macros (hopefully straightforward ones) \ to move Multiple lines/blocks from within a macro? Something along the lines of this: :map v {jma}kmb:'a,'bm'c^V^M This will put the current paragraph (without surrounding empty lines) below the line marked `c'. \ 2. Does anyone have any ideas on ways to pass parameters to macros? Is there \ a version of VI that does? You could let the user enter the parameters on a new line, and delete this line into a register, to be executed with the `@' command. -- A symbolic link is a POINTER to a file, | Maarten Litmaath @ VU Amsterdam: a hard link is the file system's GOTO. | maart@cs.vu.nl, mcsun!botter!maart