Skip to content
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

Do not trigger filetypeindent/filetypeplugin autocmds by default #691

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

blueyed
Copy link
Contributor

@blueyed blueyed commented Oct 11, 2017

This is not necessary if filetype plugin indent on was not used before
plug#end(), since then the FileType autocmds from there will come
after vim-plug's.

This will issue a warning, and makes handling of this conditional.

This could use filetype plugin/indent off to work around this (similar
to the filetype off being used), but runtime/indoff.vim and
runtime/ftplugof.vim will only empty the augroups, and not remove
them.

Fixing the user's config is the best solution anyway, so I think a
warning is good.

Might help with #581, too.

@blueyed blueyed force-pushed the skip-filetype-autocommands branch 4 times, most recently from 8f808e1 to 885930d Compare January 15, 2018 04:10
blueyed added 5 commits April 17, 2018 10:02
This is not necessary if `filetype plugin indent on` was not used before
`plug#end()`, since then the `FileType` autocmds from there will come
after vim-plug's.

This will issue a warning, and makes handling of this conditional.

This could use `filetype plugin/indent off` to work around this (similar
to the `filetype off` being used), but `runtime/indoff.vim` and
`runtime/ftplugof.vim` will only empty the augroups, and not remove
them.

Fixing the user's config is the best solution anyway, so I think a
warning is good.
This also uses `s:dobufread` for the `BufEnter` event (which enables
`<nomodeline>` for it).

Triggering `BufRead` during startup of Vim should be avoided, because it
will also trigger `FileType` events, which can have unexpected side
effects.

Ref: vim/vim#2810
@blueyed blueyed force-pushed the skip-filetype-autocommands branch from 885930d to 00d3f0a Compare April 17, 2018 08:02
@blueyed
Copy link
Contributor Author

blueyed commented Apr 17, 2018

Rebased and added queuing of autocommands before VimEnter in general (blueyed@00d3f0a, vim/vim#2810).

@janlazo
Copy link
Contributor

janlazo commented Dec 16, 2019

@blueyed Can you rebase again if it's useful to have?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants