On Thu, 15 Apr 2004 11:26:33 +0100
kevin lyda <kevin+dated+1082456802.8afea6 at ie.suberic.net> wrote:
> for vi users who don't know about recording...
>> ok, for years i'd accidentally type q and then there'd be this annoying
> "recording" thing in the bottom left. so i finally went and figured out
> how to use it. let's say you have this file:
Yeah, the other really powerful thing about this is you can use it to make the same change to lots of similar file. For example, if you've got 1000 odd DNS zone files, and you need to change all the MX records from smtp.example.com to smtp.example.net, you can do something like
vim `grep -l smtp.example.com *`
Then record the actions, and also record the :w and :n to move to the next file. Then you just have to type 1000 at a and enjoy.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://mail.linux.ie/pipermail/ilug/attachments/20040416/10b0d09e/attachment.pgp
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!