1
0
Fork 0
mirror of synced 2024-11-14 21:18:58 -05:00
ultimate-vim/sources_non_forked/vim-javascript/ftdetect/javascript.vim

11 lines
294 B
VimL
Raw Normal View History

2014-06-13 09:55:08 -04:00
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()