Vim searching through all existing buffers

前端 未结 8 579
刺人心
刺人心 2021-02-01 13:23

When dealing with a single file, I\'m used to:

/blah
do some work
n
do some work
n
do some work

Suppose now I want to search for some pattern o

8条回答
  •  一生所求
    2021-02-01 14:13

    I would open all the buffers in a new tab using the following two commands:

    :tab sp
    :bufdo sp
    

    Then search through each file one by one and close its window when you are done (use :q or :close). Use CTRL+W_ to maximize each window as you are working in it. When you're finished and you close the last window, the tab page will close and you'll be dropped back wherever you were before you decided to do the search.

提交回复
热议问题