Stephen Gran on 20 Jan 2005 03:56:48 -0000 |
On Wed, Jan 19, 2005 at 06:33:48PM -0500, sean finney said: > for the other vi users out there, i haven't been able to dig up > a way to do this... > > > say i have a line formatted something like this: > > -- sean finney <seanius@debian.org> Wed, 19 Jan 2005 18:16:33 -0500 > > is there an easy way to replace everything from wednesday on with > the output of date -R? that is, i'd like to do something like > > s/Wed.*/`date -R`/ > > only, that doesn't work :( > > the only way i can think of doing this is to write a small script/alias > that calls sed and date, but i'm hoping i've missed something... I see doing it in two phases, although it may work in one ugly long one: map <F3> :r!822-date^M :ab -- sean finney <seanius@debian.org> ^[<F3>^[ So to make the change you would type dd i #c Which is still too many characters - you could probably map all that to one thing :) -- -------------------------------------------------------------------------- | Stephen Gran | The kind of danger people most enjoy is | | steve@lobefin.net | the kind they can watch from a safe | | http://www.lobefin.net/~steve | place. | -------------------------------------------------------------------------- Attachment:
pgpilES5kKO50.pgp ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|