Read from stdin to new, named, file in vim

I'd like to start vim on a non existing file, named f, with the content c. Both f and c are arbitrary and I'd like to not have to put anything in the vim config to fill new buffers with c.

Basically, I would like to combine

$ echo c | vim -

with

$ vim f

Is there a flag to vim which lets me achieve this?


Solution 1:

You can try this command:

echo c | vim - +'w f'