You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
294 B
VimL
11 lines
294 B
VimL
9 years ago
|
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()
|