1
0
Fork 0
mirror of synced 2024-11-18 23:05:34 -05:00
ultimate-vim/sources_non_forked/vim-javascript/ftdetect/javascript.vim
2017-11-27 13:43:13 +08:00

10 lines
301 B
VimL

au BufNewFile,BufRead *.js setf javascript
au BufNewFile,BufRead *.jsm setf javascript
au BufNewFile,BufRead Jakefile setf javascript
fun! s:SelectJavascript()
if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>'
set ft=javascript
endif
endfun
au BufNewFile,BufRead * call s:SelectJavascript()