mirror of
https://github.com/amix/vimrc
synced 2024-12-23 18:33:08 +00:00
97e3db7fe9
Added: vim-ruby, typescript-vim, vim-javascript Updated: rust-vim
8 lines
253 B
VimL
8 lines
253 B
VimL
fun! s:SelectJavascript()
|
|
if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>'
|
|
set ft=javascript
|
|
endif
|
|
endfun
|
|
|
|
autocmd BufNewFile,BufRead *.{js,mjs,jsm,es,es6},Jakefile setfiletype javascript
|
|
autocmd BufNewFile,BufRead * call s:SelectJavascript()
|