Skip to content

Commit

Permalink
Make sure custom ftdetect is loaded, fixes #587
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerun committed Oct 14, 2020
1 parent bbee246 commit c45f0b8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ftdetect/polyglot.vim
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ func! s:StarSetf(ft)
endif
endfunc

" Load user-defined filetype.vim
augroup filetypedetect
runtime! filetype.vim
augroup END

augroup filetypedetect

" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
Expand Down Expand Up @@ -4834,6 +4839,10 @@ au BufNewFile,BufRead *.txt
\| setf text
\| endif

" Use the filetype detect plugins. They may overrule any of the previously
" detected filetypes.
runtime! ftdetect/*.vim

" NOTE: The above command could have ended the filetypedetect autocmd group
" and started another one. Let's make sure it has ended to get to a consistent
" state.
Expand Down

1 comment on commit c45f0b8

@laggardkernel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This causes ftdetect/*.vim loaded twice on startup. I've opened an issue about it. #706

Please sign in to comment.