Skip to content

Instantly share code, notes, and snippets.

@davglass
Created November 3, 2010 20:53
Show Gist options
  • Save davglass/661692 to your computer and use it in GitHub Desktop.
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
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