install.fairie/dotfiles/.vim/plugged/vim-javascript/ftdetect/javascript.vim
Git E2E Dev Test Username 066343f60a git subrepo clone https://github.com/pangloss/vim-javascript.git ./dotfiles/.vim/plugged/vim-javascript
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:   "???"
2022-10-18 10:36:15 -04:00

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()