I want a way to pass some literal text to Vim. I've seen that it can read from stdin with the "-" argument, so you can pipe things to it, e.g. the output of other commands.
But is there a way to pass any text into it like
vim - "Here's some random text"
and open Vim with that string in the buffer?
It complains if I try this command...
$ echo "Here's some random text" | vim -
echo string | vim -
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With