vim: search replace over all writable buffers

前端 未结 3 1215
一生所求
一生所求 2021-01-12 09:25

so

1GvG:s/..../g

can replace over an entire buffer

However, suppose I have multiple vim buffers loaded, and I want to do a :s over

3条回答
  •  再見小時候
    2021-01-12 10:01

    Take a look at bufdo. There's also windo and tabdo. Keep in mind that per default Vim doesn't autowrite so for search/replace commands across buffer you need to turn on autowrite.

提交回复
热议问题