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