Vim searching through all existing buffers

前端 未结 8 668
刺人心
刺人心 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:15

    Another approach:

    :call setqflist([])           " clear quickfix list
    :silent bufdo grepadd! foo %  " edit foo in command-line history window
    :cw                           " view search results
    

    Or mapped:

    cmap bbb call setqflist([]) \| silent bufdo grepadd!  %$hha
    

提交回复
热议问题