Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!ucla-cs!maui.cs.ucla.edu!gast From: gast@maui.cs.ucla.edu (David Gast) Newsgroups: comp.editors Subject: Re: Can you write complex vi macros? Message-ID: <1991Mar21.063109.528@cs.ucla.edu> Date: 21 Mar 91 06:31:09 GMT References: <2483@otc.otca.oz> Sender: usenet@cs.ucla.edu (Mr. News Himself) Organization: UCLA Computer Science Department Lines: 21 Nntp-Posting-Host: maui.cs.ucla.edu In article <2483@otc.otca.oz> gregm@otc.otca.oz.au (Greg McFarlane) writes: >It seems that you cannot have more than one "undo-able" vi command in the >one macro. This means that a complex vi macro must be split into several >smaller macros. Not correct. Consider: :map X rxlrx (where is X can be another character) This map changes the character under the cursor to x and then changes the character to the right to x. u will undo both changes. As a general rule, your statement is not correct. > vi tells me "Can't yank inside global/macro" Vi has a known bug with respect to the unnamed buffer. David Gast