Re: [PATCH v2 1/2] Add project-wide .vimrc configuration
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- Dec 15, 2020, 06:56 UTC
- Message-ID
- <5fd85e2eeab1a_d7c48208f6@natae.notmuch>
- In-Reply-To
- <X9hJenCYkwTmxNjA@coredump.intra.peff.net>
Jeff King wrote:
Show 7 quoted lines
> 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