mirror of
https://github.com/jelera/vim-javascript-syntax.git
synced 2025-12-12 07:31:54 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user