On 2016-07-26, Bram Moolenaar wrote:
> Gary Johnson wrote:
>
> > On 2016-07-26, Bram Moolenaar wrote:
> > > 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?
> >
> > No. I execute the filetype command late in my vimrc so that some of
> > my BufRead autocommands will be executed before Vim's. I want
> > buffers to be initially configured by project, which means looking
> > at the full path to the file being opened, and then by filetype.
> >
> > I turn _off_ filetype detection near the top of my vimrc in
> > environments where it's been turned on in some system vimrc.
>
> Hmm, this very much depends on what you want to do in your .vimrc.
> I think it's still best to enable filetype detection when there is no
> .vimrc at all. And I suspect doing what you do, disabling filetype
> detection at the start of your .vimrc allows for any sequence that you
> choose.
>
>
> Here is what I have come up with, listenting to the comments so far and
> giving it some magic weighing:
[...]
Not all of those would be my preference, but they seem reasonable,
and as long as all of that is in a file and the compile-time
defaults aren't changed, I'm fine with it.
I was surprised by this:
> " For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries
> " let &guioptions = substitute(&guioptions, "t", "", "g")
Why substitute() instead of just -=?
set guioptions-=t
Regards,
Gary
--
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.