Wednesday, December 30, 2009

Re: accelerate seven (or more) substitute

Hi epanda!

On Mi, 30 Dez 2009, epanda wrote:

> foo to change to bar
> oof to change to rab
> ofo to change to abr
> fof to change to arb
> etc...
>
> all word are different

let subst['foo'] = 'bar'
let subst['oof'] = 'rab'
let subst['fof'] = 'arb'
let subst['ofo'] = 'abr'
exe ':%s/' . join(keys(subst), '\|'). '/\=subst[submatch(0)]/g'


regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
38. You wake up at 3 a.m. to go to the bathroom and stop and check your e-mail
on the way back to bed.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment