James McCoy wrote: > On Mon, Jul 25, 2016 at 07:39:55AM -0700, Ben Fritz wrote: > > On Sunday, July 24, 2016 at 8:03:06 AM UTC-5, Bram Moolenaar wrote: > > > > > > if has("autocmd") > > > " Enable file type detection. > > > filetype plugin indent on > > > > > > > Don't common plugin managers require you to turn on filetype stuff at > > a very specific location, e.g. *after* loading the plugin manager > > functionality? > > By now, most of them do this automatically, but I still advocate against > doing this before the vimrc is loaded since it causes non-obvious > problems to users (and am annoyed that Ubuntu deviates from the way I've > setup Debian's packaging in this regard). > > The reason this needs to be done is to for ftdetect scripts. > > Without doing the equivalent of > > :filetype off > " Setup plugin manager > " Re-run :filetype on, if needed > > any ftdetect scripts located in the runtime paths handled by the plugin > manager wouldn't have their settings applied. > > Now, in Neovim we've enable filetype plugins and indent scripts by > default. However, we also track whether they were enabled > automatically, or modified by the user, so that "filetype plugin on" in > the user's vimrc only enables plugins instead of acting like a no-op. > You can see the discussion of the behavior/implementation at > <https://github.com/neovim/neovim/pull/4223>.
Arent't users already executing the filetype command early in their .vimrc? If a plugin manager can't handle that, it has a problem anyway. It has always been in the vimrc_example.vim. We could postpone the effect of the :filetype command, but that will most likely cause problems for users who intentionally do it early and then overrule some of it. I think plugins should not use ftdetect/*.vim but execute the autocommands that it would contain in the plugin. Is there any problem with that? -- Lose weight, NEVER Diet again with The "Invisible Weight Loss Patch" (spam e-mail) /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.