>>176
適当やけどこんなんでどうすか
function! SuperSubstitute(pat, after, flags)
while search(a:pat, 'cw') > 0
exe printf('s/%s/%s/%s', a:pat, a:after, a:flags)
endwhile
endfunction
cal SuperSubstitute('hoge', 'huga', 'gc')