066343f60a
subrepo: subdir: "dotfiles/.vim/plugged/vim-javascript" merged: "c470ce13" upstream: origin: "https://github.com/pangloss/vim-javascript.git" branch: "master" commit: "c470ce13" git-subrepo: version: "0.4.3" origin: "???" commit: "???"
8 lines
257 B
VimL
8 lines
257 B
VimL
fun! s:SelectJavascript()
|
|
if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>'
|
|
set ft=javascript
|
|
endif
|
|
endfun
|
|
|
|
autocmd BufNewFile,BufRead *.{js,mjs,cjs,jsm,es,es6},Jakefile setfiletype javascript
|
|
autocmd BufNewFile,BufRead * call s:SelectJavascript()
|