git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
	Jeff King <peff@peff.net>,
	Emily Shaffer <emilyshaffer@google.com>,
	Aaron Schrab <aaron@schrab.com>,
	Denton Liu <liu.denton@gmail.com>,
	Christian Couder <christian.couder@gmail.com>
Subject: Re: [PATCH v2 1/2] Add project-wide .vimrc configuration
Date: Thu, 10 Dec 2020 03:50:56 +0000	[thread overview]
Message-ID: <X9GbIG9vZbK1pEoi@camp.crustytoothpaste.net> (raw)
In-Reply-To: <20201209065537.48802-2-felipe.contreras@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2680 bytes --]

On 2020-12-09 at 06:55:36, Felipe Contreras wrote:
> diff --git a/.vimrc b/.vimrc
> new file mode 100644
> index 0000000000..602c746477
> --- /dev/null
> +++ b/.vimrc
> @@ -0,0 +1,22 @@
> +" To make use of these configurations install the git plugin provided in
> +" the contrib section:
> +"
> +"   cp -aT contrib/vim ~/.vim/pack/plugins/start/git
> +"
> +" Then whitelist the location of this directory to your ~/.vimrc:
> +"
> +"   let g:gitvimrc_whitelist = [ expand('$HOME') . '/dev/git' ]
> +"
> +" You can add multiple locations, or specify a regexp pattern.
> +"
> +
> +augroup git
> +	au BufRead,BufNewFile */Documentation/*.txt set filetype=asciidoc
> +
> +	au FileType c setl noexpandtab tabstop=8 shiftwidth=0 cino=(s,:0,l1,t0
> +	au FileType sh setl noexpandtab tabstop=8 shiftwidth=0
> +	au FileType perl setl noexpandtab tabstop=8 shiftwidth=0
> +	au FileType asciidoc setl noexpandtab tabstop=8 shiftwidth=0 autoindent
> +augroup END

I don't think this should go in this location.  It should go in contrib.
Here's why:

* We should not ship editor-specific files in the main directory of the
  repository.  Even though Vim is very popular, it is one of many
  editors, and it is not even the most popular editor (which is now VS
  Code).  We have editor-independent files, and users can copy this into
  the root of the repository and ignore it if they want it there.
* Whether a user wants to use automatic indentation is a personal
  preference.  I do happen to like it, but there are others who don't
  and prefer to leave it off.  Similarly, whether to use cindent,
  smartindent, or autoindent is a preference, as is which cindent
  options to use (I use different ones).
* These settings affect every file that's loaded in the same editor
  process.  While many people open different editor windows for
  different projects, other people prefer to use the client-server
  functionality to load all of their projects in the same editor.  These
  are not, for example, the editor settings I normally use for non-Git
  AsciiDoc files.

So while I agree that these are common settings, they are not
universally applicable, even for Vim and Neovim users, and we shouldn't
try to claim that all or even most Vim and Neovim users should use them.
In contrast, the .editorconfig file specifies things which are (a)
guaranteed to affect only this repository and (b) are essential parts of
our coding style.  It notably omits things like line endings which are a
matter of user or platform preference.

So I think contrib makes more sense here.
-- 
brian m. carlson (he/him or they/them)
Houston, Texas, US

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  parent reply	other threads:[~2020-12-10  3:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09  6:55 [PATCH v2 0/2] vim: configuration and sharness syntax Felipe Contreras
2020-12-09  6:55 ` [PATCH v2 1/2] Add project-wide .vimrc configuration Felipe Contreras
2020-12-09  8:53   ` Christian Brabandt
2020-12-09 10:29     ` Felipe Contreras
2020-12-09 10:45       ` Christian Brabandt
2020-12-09 17:27   ` Jeff King
2020-12-10  1:55     ` Felipe Contreras
2020-12-10 15:27       ` Jeff King
2020-12-11  0:43         ` Felipe Contreras
2020-12-10  3:50   ` brian m. carlson [this message]
2020-12-11  1:08     ` Felipe Contreras
2020-12-11  2:56       ` brian m. carlson
2020-12-11  4:37         ` Felipe Contreras
2020-12-15  1:39         ` Jeff King
2020-12-15  3:03           ` Felipe Contreras
2020-12-15  5:28             ` Jeff King
2020-12-15  6:56               ` Felipe Contreras
2020-12-09  6:55 ` [PATCH v2 2/2] contrib: vim: add sharness syntax file Felipe Contreras
2020-12-09  7:05   ` Eric Sunshine
2020-12-09 10:39     ` Felipe Contreras
2020-12-09 17:11 ` [PATCH v2 0/2] vim: configuration and sharness syntax Jeff King
2020-12-10  3:25   ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X9GbIG9vZbK1pEoi@camp.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=aaron@schrab.com \
    --cc=christian.couder@gmail.com \
    --cc=emilyshaffer@google.com \
    --cc=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).