Created
November 3, 2010 20:53
-
-
Save davglass/661692 to your computer and use it in GitHub Desktop.
Put this in ~/.vim/scripts.vim to auto syntax highlight node files without an extension that have #!/usr/bin/env node on the first line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if did_filetype() " filetype already set.. | |
finish " ..don't do these checks | |
endif | |
if getline(1) =~ '^#!.*node' | |
setfiletype javascript | |
endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment