Set filetype based on node shebang

Recognizes the node shebang line and sets the filetype to javascript.
Syntax highlights the shebang as well.
This commit is contained in:
Mike Williamson committed 2012-05-24 20:35:40 -04:00
1 parent 2648939cbf
commit 405df92c21
2 files changed
+10

No files matched your search

+4
View File
@@ -28,6 +28,10 @@ setlocal iskeyword+=$
syntax sync fromstart
"" syntax coloring for Node.js shebang line
syn match shebang "^#!.*/bin/env\s\+node\>"
hi link shebang Comment
"" JavaScript comments"{{{
syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained
syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo