Autor: Phil Pennock Data: Dla: exim-dev Temat: Re: [exim-dev] exim .editorconfig -- any objections?
On 2015-08-28 at 15:40 +0200, Heiko Schlittermann wrote: > Jeremy Harris <jgh@???> (Fr 28 Aug 2015 15:12:22 CEST):
> > > I _think_ that it reflects what's as close to common practice as we
> > > come.
> >
> > If it works with whatever vi-de-jour I happen to be using, I guess
> > it's ok. I see vim is specifically noted on the website as requiring
> > a plugin to work with it, along with a lot of other editors.
It's one common spec, so instead of littering the source files with
per-editor configs, we can at least get the very basics down in one
common place.
> > Can it handle the other things I commonly set in a vi: config line;
> > autowrite, autoindent?
No, it just covers the basics. Common indent amounts, sw=2 etc. Even
this initial file includes:
# vim users try: cinoptions=>1s,{1s
That's just something I grabbed from my ~/.vimrc as applying to exim
paths, which I couldn't map, so I figured a comment in this file was the
right place for it.
> For vim I'm using now that plugin (via pathogen) and it seems to work.
> Changes in .editorconfig override settings from my global ~/.vimrc and
> settings via modeline in turn override the .editorconfig settings.
Please note: I'm not trying to force anyone to install editorconfig
plugins; it's a useful system which is entirely optional, and doesn't
impact on people not using it, but provides a nice readable common
source for settings.
I will probably keep, in my ~/.vimrc, this:
if has("autocmd")
au BufNewFile,BufRead */*exim*/src/* set noai nosmartindent expandtab cindent sw=2 cinoptions=>1s,{1s
endif
> This means, we should strip the modlines from all source files, shouln't
> we?
Not all. Some, especially on Perl files, set different shift-widths.
There were only a couple of files affected at all ... but now I see that
I only grep'd for `vim:`, not for `vi:`. Oops.
Looking at `vi: aw ai sw=2` ... I think that `autowrite` is
inappropriate to share in a common source tree, as that's a mode of
working, so belongs in a personal .vimrc; `ai` is nice to help people
lay things out right, but again is around "what the editor does for
you", not "what the code must look like". Which leaves just `sw=2`.
(Sorry Todd, I hadn't realized those were so prevalent back when I
reviewed your Python interpreter work)
We can add comments to the `.editorconfig` file with suggestions for many
text editors, as just one common place which exists. I'll do so, for my
.vimrc suggestion above.
I'm not inclined to rush to bulk-edit every file for a New World Order.
I'd rather see people get comfortable with this approach and then, if
there's consensus, we might strip later.