git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add project-wide .vimrc configuration

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Dec 9, 2020, 02:32 UTC
Message-ID
<CAMP44s0nno90=xKmiZ0=PYQKraSwev7hmEUXfHoFDU3FR37KCw@mail.gmail.com>
In-Reply-To
<xmqqy2i74wgv.fsf@gitster.c.googlers.com>
On Tue, Dec 8, 2020 at 7:08 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 10 quoted lines
>
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
> > It's not efficient that everyone must set specific configurations in all
> > their ~/.vimrc files; we can have a project-wide .vimrc that everyone
> > can use.
>
> Does .vimrc gets used from the current directory?  If so, just like
> clang-format, it makes sense to place it with dot-prefix at the root
> of the project, like this patch does.  But ...

Actually no. I tested this with "vim Documentation/git-pull.txt", and that works fine, but apparently only from that directory.

I'm investigating other solutions.
Show 13 quoted lines
> > By default it's ignored, you need the following in your ~/.vimrc
> >
> >   set exrc
> >   set secure
>
> ... it does not sound like it is the case.
>
> And I am sensing that this ".vimrc that happens in the current
> directory is not used by default" is not such a well known fact
> among vim users (otherwise you wouldn't be writing it here), and if
> that is the case, I am afraid that this invites an unneeded end-user
> confusion when they see dot-commandname-rc file and see its contents
> not honored at all.
I'd say at least 90% of what vim does is not well known for most vim uses.
Show 6 quoted lines
> Whether it is well known by intended audience that it is by default
> unused, we should give the instruction we see above (and below, up
> to the description of how to override) in a comment at the beginning
> of the file, I think.  Then, once the user follows the insn, the new
> file added by this patch would start working without any further user
> action, which is very nice.

Right. That makes sense. I'll add the instructions to the next version once I find a good alternative for exrc.

Cheers.
-- 
Felipe Contreras
Previous: Junio C HamanoNext: Aaron Schrab
Message 3 of 15 in “Add project-wide .vimrc configuration”
  1. Add project-wide .vimrc configurationFelipe Contreras, Dec 9, 2020
  2. Junio C HamanoDec 9, 2020
  3. Felipe ContrerasDec 9, 2020
  4. Aaron SchrabDec 9, 2020
  5. Junio C HamanoDec 9, 2020
  6. Felipe ContrerasDec 9, 2020
  7. Denton LiuDec 9, 2020
  8. Felipe ContrerasDec 9, 2020
  9. brian m. carlsonDec 9, 2020
  10. Felipe ContrerasDec 9, 2020
  11. Junio C HamanoDec 9, 2020
  12. Felipe ContrerasDec 9, 2020
  13. Junio C HamanoDec 9, 2020
  14. Felipe ContrerasDec 9, 2020
  15. Randall S. BeckerDec 9, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.