tags:

views:

963

answers:

3

I am looking for some command like:

:b1!g/something_here/

where I supposedly search for a word "something_here" in the buffer "b1". How can I do it?

+4  A: 

Well, go to buffer b1 and

:g/something here/

For searching through all open buffers there are various plugins, for which I think would be best if you took a peak on www.vim.org

Edit: like this one - buffergrep
And my personal favorite for all kinds of searching: compview

ldigas
+5  A: 

I often do:

:rew
:bufdo 0
:bufdo g/something here/
:ls

The last :ls allows me to see all the buffers that are not positioned on line 1

John Weldon
Thank you. the command ":bufdo" is useful. +1
Masi
A: 

You can try something simple: :b0 |?somethingToSearch

amorales