mirror of
https://github.com/jelera/vim-javascript-syntax.git
synced 2025-12-11 23:22:02 +08:00
7 lines
177 B
VimL
7 lines
177 B
VimL
function! s:DetectJS()
|
|
if getline(1) =~# '^#!.*/bin/\(env\s\+\)\?node\>'
|
|
setfiletype javascript
|
|
endif
|
|
endfunction
|
|
autocmd BufNewFile,BufRead * call s:DetectJS()
|