Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: Writting a vi macro, help please.
- To: tlug@example.com
- Subject: Re: Writting a vi macro, help please.
- From: "Thomas O'Dowd" <tom@example.com>
- Date: Fri, 17 Nov 2000 12:37:22 +0900
- Cc: linux@example.com
- Content-Disposition: inline
- Content-Type: text/plain; charset=us-ascii
- In-Reply-To: <3A149F10.73AA85B3@example.com>; from antony@example.com on Fri, Nov 17, 2000 at 11:59:28AM +0900
- References: <3A149F10.73AA85B3@example.com>
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <nns62B.A.SGC.ueKF6@example.com>
- Resent-Sender: tlug-request@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? tom@example.com http://www.nooper.com
- References:
- Writting a vi macro, help please.
- From: Antony Stace <antony@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.
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links