e.g. *.jjdescription, *.http, *.mysql_history, & others
It seems vim-polyglot loads vim-filetype.vim then clobbers it by
"resetting" with au! filetypedetect afterwards, even though
vim-polyglot intends to be a fallback, according to comments in
init.vim
This is evidenced by *.jjdescription, *.http, and .mysql_history,
filetype extensions defined in vim-filetype.vim but not
polyglot-filetype.vim:
vim -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" foo.jjdescription
vim -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" foo.http
vim -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" .mysql_history
Compare:
vim --clean -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" foo.jjdescription
vim --clean -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" foo.http
vim --clean -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" .mysql_history
And:
vim -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" foo.py
vim -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" foo.bash
vim -c "redir >> /dev/stdout" -c "set filetype?" -c "redir END" -c "sleep 3" -c "quit" foo.js
Note although vim-polyglot does not define bash.vim nor
javascript.vim, polyglot-filetype.vim does define the *.bash and
*.js extensions, so they "still work"
I'm using vim --version and vim-plug:
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled May 23 2025 00:48:59)
Included patches: 1-948, 950-1230, 1242, 1244
e.g.
*.jjdescription,*.http,*.mysql_history, & othersIt seems vim-polyglot loads vim-
filetype.vimthen clobbers it by"resetting" with
au! filetypedetectafterwards, even thoughvim-polyglot intends to be a fallback, according to comments in
init.vimThis is evidenced by
*.jjdescription,*.http, and.mysql_history,filetype extensions defined in vim-
filetype.vimbut notpolyglot-
filetype.vim:Compare:
And:
Note although vim-polyglot does not define
bash.vimnorjavascript.vim, polyglot-filetype.vimdoes define the*.bashand*.jsextensions, so they "still work"I'm using
vim --versionand vim-plug: