Skip to content

Fix ftdetect interfering with other plugins #1183

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix ftdetect interfering with other plugins
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 committed Aug 14, 2019
commit 193ae9ae0c5131b2d0bb1882772ec12c9f37733a
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()