Today I Learned

A Hashrocket project

Ready to join Hashrocket? Find Openings here and apply today.

Pipe text into Vim from stdin

You can pipe text into vim directly from stdin. This can be helpful if you want to edit the output of a long bash command, or if you want to see what an installation script contains before piping it into bash.

curl -fsSL | vim -

The key is to use the - after the vim command to make it read from stdin. This will open a new buffer with the output of the previous command.

Every developer at Hashrocket is a Vim expert. Check out our development environment, Dotmatrix, and if you are in Chicago, come to the Vim Chicago Meetup hosted at our Chicago office.