Today I Learned

A Hashrocket project

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

Set Syntax Highlighting Manually

If you’ve opened a file with Vim and it has a weird extension (or you’ve just pasted code into a new file with no extension yet), you might need to set your highlighting manually. Just use :set syntax:[language], for example:

:set syntax:javascript
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.