Files
vim-javascript-syntax/ftdetect/javascript.vim
2016-02-20 18:59:10 -05:00

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()