Reputation: 2279
Suppose that I have a command, say find ABCD | grep text1
which outputs full-path of a file to be opened. I know I can send this output to vim
using xargs
and open the file, but this is possible only in command line.
How can I do this from inside vim editor?
Upvotes: 0
Views: 149
Reputation: 5940
Assuming COMMAND returns exactly the path of your file, then something like this should be ok from the command line:
$ vi $(COMMAND)
and this should be ok from within vim:
:e `COMMAND`
Upvotes: 4