Today I Learned

hashrocket A Hashrocket project

Share Highlighted Code

Today I learned a cool trick.

Select a range of code, enter command mode, and type Gbrowse:


This opens Github in your browser with the range of code highlighted. Github support seems to be standard; I believe you can add other code hosting providers.

Here's a link I made with this command:

This also accepts a line number:

:10 Gbrowse
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.