After I have opened a file include()ed with gf, how can I copy text from that file into the original file’s search function?
For instance, if I am working on a PHP file and it has a line:
include("someFile.php");
I would put the cursor on someFile.php and press gf. In that file I see the text function reallyLongFunctionName() {}. I would like to search for that function in the original file. I can copy the function name with v and then Ctrl-O my way back to the original file, but now how do I perform the search?
Thanks!
You can just press
*on the function name, and when you return to the original file it will already be highlighted. Pressnto find the first instance.*locates all instances of the word under the cursor in all buffers.It sounds like you’re doing a tag lookup (Ctl–]) in reverse.