Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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 peek on www.vim.org

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

You can try something simple: :b0 |?somethingToSearch

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top