Today I Learned

hashrocket A Hashrocket project

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 https://raw.github.com/cknadler/vim-anywhere/master/install | 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.

See More #vim TILs
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.