We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 31f6eff + 405df92 commit 5f45ff9Copy full SHA for 5f45ff9
ftdetect/javascript.vim
@@ -0,0 +1,6 @@
1
+function! s:DetectJS()
2
+ if getline(1) =~# '^#!.*/bin/env\s\+node\>'
3
+ setfiletype javascript
4
+ endif
5
+endfunction
6
+autocmd BufNewFile,BufRead * call s:DetectJS()
syntax/javascript.vim
@@ -28,6 +28,10 @@ setlocal iskeyword+=$
28
29
syntax sync fromstart
30
31
+"" syntax coloring for Node.js shebang line
32
+syn match shebang "^#!.*/bin/env\s\+node\>"
33
+hi link shebang Comment
34
+
35
"" JavaScript comments"{{{
36
syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained
37
syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo
0 commit comments