Sunday, December 2, 2007

Substitute chains with VIM

:%s/pattern/newchain/

This will substitute the first chain that matches the pattern, if you want to substitute all the chains that match the pattern the correct syntax is:

:%s/pattern/newchain/g

2 comments:

Anonymous said...

the real syntax is:

:%s/pattern/newchain/

This will substitute the first chain that matches the pattern, if you want to substitute all the chains that match the pattern the correct syntax is:

:%s/pattern/newchain/g

Eres un melon

randradas said...

thank you i have added your correction to the post ;).