I think you can. You pipe to `vim`, and it will open a buffer with the contents. I am not sure if it will pipe out, though.
Edit: I've now tried it myself with `rep`.
It's not automatic, unfortunately. You can use `vipe` (part of moreutils on my machine) to pipe into vim (or any `$EDITOR`) and to pipe the result out.
However, `rep` wants a pager. If you run `vim` with `rep` at the end of the pipeline, everything gets garbled because `rep` (well, the pager) is the one taking key presses.
To get around this, you can pipe `rep` to something else. I piped it to `cat -`, which forced it into outputting to `stdout`.
Edit: I've now tried it myself with `rep`.
It's not automatic, unfortunately. You can use `vipe` (part of moreutils on my machine) to pipe into vim (or any `$EDITOR`) and to pipe the result out.
However, `rep` wants a pager. If you run `vim` with `rep` at the end of the pipeline, everything gets garbled because `rep` (well, the pager) is the one taking key presses.
To get around this, you can pipe `rep` to something else. I piped it to `cat -`, which forced it into outputting to `stdout`.
So my final command looked like this:
Make sure your `$EDITOR` variable is set correctly for `vipe`.Anyway, I'm going to add a PR to `rep` to add a command-line flag to output to stdout without a pipe. If it is accepted, that should help.