🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.editors
Article #3296

Re: vi macros to convert the case of a word

#3296
From: MHx5563
Date: Fri, 09 Sep 1988 15:59
15 lines
1071 bytes
In article <8686@ihlpb.ATT.COM>, bdewbank@ihlpb.ATT.COM (Ewbank) writes:
> Recently, there was a question about how to convert the case of a word in vi.
> Just for fun, I tried to write a macro...and succeeded!
> 
.. macro follows
> 

I modified the macro to convert the case of a word to work when
autoindent is set.  The following line should be stored in $HOME/.exrc
Note than characters preceded by ^ must be converted to control
characters and ^[ must be converted to <ESC>

map ^T i^M^[Ea^M^[-y$Pa^M^[-:s/^[   ]*//^M:s/./\~/g^M0"zd$+@z--4J

Jon Eiseman, AT&T Bell Labs, att!m21ux!jon
Technical Details
Message-ID: <681@m10ux.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!ucsd!rutgers!bellcore!faline!thumper!ulysses!mhuxo!mhuxt!mhuxi!mhuxh!mhuxu!m10ux!faf
References: <8686@ihlpb.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!ucsd!rutgers!bellcore!faline!thumper!ulysses!mhuxo!mhuxt!mhuxi!mhuxh!mhuxu!m10ux!faf
From: faf@m10ux.UUCP ( MHx5563)
Newsgroups: comp.editors
Subject: Re: vi macros to convert the case of a word
Summary: modified macro to handle autoindent
Keywords: fun fun fun
Message-ID: <681@m10ux.UUCP>
Date: 9 Sep 88 15:59:18 GMT
References: <8686@ihlpb.ATT.COM>
Organization: AT&T Bell Labs, Murray Hill
Lines: 14