From: Felipe Contreras Date: Tue, 15 Dec 2020 06:56:46 GMT Subject: Re: [PATCH v2 1/2] Add project-wide .vimrc configuration Message-ID: <5fd85e2eeab1a_d7c48208f6@natae.notmuch> In-Reply-To: Jeff King wrote: > Ideally we'd combine the autoloader for BufRead and FileType, but it > seems non-trivial to do so. I think: > > au BufNewFile,BufRead /path/to/git/* if &filetype == "c" | setl ... | endif > > works, though it's a little clunky, as each line would need to repeat > it. Yeah, that works, *temporarily*. If the user has configured ~/.vim/after/ftplugin/c.vim, that would override those autocommand settings when the file is reloaded. Which is precisely why the above is not recommended. > I don't think we need to solve "here's how to trigger some settings > for some directories" for everyone. We should let them integrate the > settings as they see fit. Yeah. But how? I already explored this at dept, and I arrived at only one sensible option. -- Felipe Contreras