I want to debug a process, hence I attached strace to the process and redirected the output to a file and then performed the operation. During the process it has created a lot of processes. So here is what I want to do, I want to select all the system calls executed by a process. To do that I used grep command with pattern as pid:
:grep pid %
It shows the result but I am not able to traverse through the result, it promts
Press ENTER or type command to continue
and returns to the file. What I would like to do is store the result in a buffer and then have a look into it and if required save it into a file or else discard it and return to the original file. Is there a way to do this with out exiting from the vim editor? Thanks in advance.
I would like to search with the result and store that in a buffer.
You can go to older searches, and back easily:
You can have another search using
lvimgrep(uses location window):It also has history:
You can read into any buffer:
Finally, any command that gives output, can be redirected with the
redircommand:See
:he redirfor the many ways to use it (redirect into registers or variables).