How do I search the open buffers in Vim?
Solution 1:
Or
:bufdo vimgrepadd threading % | copen
The quickfix window may not look good for you but it's a hell of a lot more functional than ST2's "results panel" if only because you can keep it open and visible while jumping to locations and interact with it if it's not there.
Solution 2:
ack and Ack.vim handle this problem beautifully. You can also use :help :vimgrep
. For example:
:bufdo AckAdd -n threading
will create a nice quickfix window that lets you hop to the cursor position.
Solution 3:
Like the answer of Waz, I have written custom commands for that, published in my GrepCommands plugin. It allows to search over buffers (:BufGrep
), visible windows (:WinGrep
), tabs, and arguments.
(But like all the other answers, it doesn't handle unnamed buffers yet.)