[vim] one line pattern range command
已有 63 次阅读2018-10-13 19:58
|个人分类:vim
:g/^pattern/s/$/mytext
http://vim.wikia.com/wiki/Power_of_g
Without g, this doesn't seem to work..?
:/^pattern/s/$/mytext
From pattern to pattern would work though? (http://vim.wikia.com/wiki/Ranges)
:/apples/,/apples/+1s/old/new/g
:/apples/,/peaches/ s/old/new/g