Mailing List Archive
Support open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Writting a vi macro, help please.
- To: email@example.com
- Subject: Re: Writting a vi macro, help please.
- From: "Thomas O'Dowd" <firstname.lastname@example.org>
- Date: Fri, 17 Nov 2000 12:37:22 +0900
- Cc: email@example.com
- Content-Disposition: inline
- Content-Type: text/plain; charset=us-ascii
- In-Reply-To: <3A149F10.73AA85B3@example.com>; from firstname.lastname@example.org on Fri, Nov 17, 2000 at 11:59:28AM +0900
- References: <3A149F10.73AA85B3@example.com>
- Reply-To: email@example.com
- Resent-From: firstname.lastname@example.org
- Resent-Message-ID: <nns62B.A.SGC.ueKF6@example.com>
- Resent-Sender: email@example.com
- User-Agent: Mutt/1.2.4i
On Fri, Nov 17, 2000 at 11:59:28AM +0900, Antony Stace wrote: > Hi Folks > > Can someone please tell me how I can write a macro for vi which will > insert both a /* at the start of a line and a */ at the end of it. > > ie. > > I am a comment > > becomes > > /*I am a comment*/ :s/^\(.*\)$/\/*\1*\// I never did learn vi enough to work with macros and such but you could probably map it to a key like... :map <F8> :s/^\(.*\)$/\/*\1*\// and then just press F8 on the line where you want to put surrounding comments on. I'm sure someone else has a better example for you. Tom. -- Thomas O'Dowd Have you had your noop today? firstname.lastname@example.org http://www.nooper.com
- Writting a vi macro, help please.
- From: Antony Stace <email@example.com>
Home | Main Index | Thread Index
- Prev by Date: Writting a vi macro, help please.
- Next by Date: any future broadband rumors?
- Prev by thread: Writting a vi macro, help please.
- Next by thread: Re: Writting a vi macro, help please.
Home Page Mailing List Linux and Japan TLUG Members Links