1
0
Fork 0
mirror of synced 2024-12-26 16:43:20 -05:00
ultimate-vim/sources_non_forked/vim-javascript/ftdetect/javascript.vim
2022-11-21 23:06:50 +08:00

8 lines
257 B
VimL

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