1
0
Fork 0
mirror of synced 2024-11-04 16:38:59 -05:00
ultimate-vim/sources_non_forked/vim-javascript/ftdetect/javascript.vim

9 lines
253 B
VimL
Raw Normal View History

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