v
now automatically reads from stdin
I previously wrote v
to help with a couple of my common wants when starting Vim. Something I often forget is to pass the -
when piping stdin
to Vim, expecting it to behave in the same way as other commands like less
. So I’ve updated v
to automatically pass the -
argument to Vim if it detects that it’s receiving content from stdin
.
Here’s what now happens:
$ echo testy | v
Vim: Reading from stdin...
As ever the source is on GitHub. For the curious here are the tests for this newly added functionality.
Also on medium.com.