Skip to content

Commit

Permalink
Fix ftdetect interfering with other plugins (#1183)
Browse files Browse the repository at this point in the history
This is from the help doc :help ftdetect:

Note that there is no "augroup" command, this has already been done
when sourcing your file.  You could also use the pattern "*" and then
check the contents of the file to recognize it.

Reference:
Vimjas/vint#264
fatih/vim-go#1645
  • Loading branch information
NicholasAsimov authored and amadeus committed Aug 14, 2019
1 parent 7cc6bae commit b6c8c84
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ftdetect/javascript.vim
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ fun! s:SelectJavascript()
endif
endfun

augroup javascript_syntax_detection
autocmd!
autocmd BufNewFile,BufRead *.{js,mjs,jsm,es,es6},Jakefile setfiletype javascript
autocmd BufNewFile,BufRead * call s:SelectJavascript()
augroup END
autocmd BufNewFile,BufRead *.{js,mjs,jsm,es,es6},Jakefile setfiletype javascript
autocmd BufNewFile,BufRead * call s:SelectJavascript()

0 comments on commit b6c8c84

Please sign in to comment.