Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!milano!mister-curious!loo From: loo@mister-curious.sw.mcc.com (Joel Loo) Newsgroups: comp.editors Subject: Re: Editor Wars Keywords: editors, vi Message-ID: <2297@mister-curious.sw.mcc.com> Date: 1 May 89 22:30:19 GMT References: <175@hcr.UUCP> <587@alice.marlow.uucp> <4048@ttidca.TTI.COM> <960@myrias.UUCP> <24@hcr.UUCP> <4129@ttidca.TTI.COM> <194@xochitl.UUCP> <156@inf.ethz.ch> <3892@mipos3.intel.com> <23162@agate.BERKELEY.EDU> <175@inf.ethz.ch> <238@crdgw1.crd.ge.com> Reply-To: loo@mister-curious.sw.mcc.com (Joel Loo) Organization: MCC, Austin, Texas Lines: 30 In article <238@crdgw1.crd.ge.com> barnett@crdgw1.crd.ge.com (Bruce G. Barnett) writes: >>map! #in #include > >I use to do this, but stopped because if I cut some text >out of one window system, and pasted it into another window >system, the "#include" would become "#includeclude". You do not have to worry: the substitution will be done only if "#in" is followed by a (this is how 'abbr' works.) "#include" will not be substituted. However, using of visible chars such as '#', ';' etc as prefixes to macros is not a good practice. You are right, we shd try using chars like ^X, ^V, etc. ObMacro: "Execute the current line as editor command": good for interactive macro/abbr testing. (Please replace control chars appropriately.) map ^Xm "dyy:@d^M E.g. type in the following line in a vi buffer: map ^P !}fmt on this same line press ^Xm a new macro ^P will get defined immediately. -- Joel