I have started learning Vim word-search using *
and #
while the cursor is over the current word. But this search is limited to the current file buffer.
Is there a command or a shortcut to extend this search to:
- all opened tabs?
- all opened buffers?
Best Answer
I don't have an exact solution for your problem, hopefully a better answer than mine will come up. But this is how I tackled the problem of finding a word in all buffers.
The first line creates a command
Search
with the search pattern as argument, which writes the results in a quickfix list. The two other lines map the (at least for me) useless arrow keys to something useful; they are mapped to jump to the next/previous Search or to the next/previous compile error, etc., they simply step throu the quickfix list. You can use this as follows: