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