Today I Learned

hashrocket A Hashrocket project

Chaining Vim Commands ⛓

You can chain Vim commands together using |. Here's an example:

:help fugitive | resize 10

This will open the help page for Vim-Fugitive, and then resize the current window.

Here's some real-life code I execute frequently:

:Gread | w

This empties the buffer and reads it at the last git revision, then writes the file. Very useful for rapid experimentation.

See :help :bar for more information.

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.