Do not trigger filetypeindent/filetypeplugin autocmds by default#691
Open
blueyed wants to merge 5 commits intojunegunn:masterfrom
Open
Do not trigger filetypeindent/filetypeplugin autocmds by default#691blueyed wants to merge 5 commits intojunegunn:masterfrom
blueyed wants to merge 5 commits intojunegunn:masterfrom
Conversation
8f808e1 to
885930d
Compare
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
885930d to
00d3f0a
Compare
Contributor
Author
|
Rebased and added queuing of autocommands before VimEnter in general (blueyed@00d3f0a, vim/vim#2810). |
Contributor
|
@blueyed Can you rebase again if it's useful to have? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is not necessary if
filetype plugin indent onwas not used beforeplug#end(), since then theFileTypeautocmds from there will comeafter vim-plug's.
This will issue a warning, and makes handling of this conditional.
This could use
filetype plugin/indent offto work around this (similarto the
filetype offbeing used), butruntime/indoff.vimandruntime/ftplugof.vimwill only empty the augroups, and not removethem.
Fixing the user's config is the best solution anyway, so I think a
warning is good.
Might help with #581, too.