11 lines
301 B
VimL
11 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()
|