[Python-Dev] Fwd: [Python-checkins] r51674 - python/trunk/Misc/Vim/vimrc

Guido van Rossum guido at python.org
Fri Sep 1 17:02:37 CEST 2006


For 2.x we really don't want to reformat all code. I even think it's
questionable to use 4 spaces for new files since it will mean problems
for editors switching between files.

For 3.0 we really do. But as long as 2.x and 3.0 aren't too far apart
I'd rather not reformat everything because it would break all merge
capabilities.

--Guido

On 9/1/06, Jim Jewett <jimjjewett at gmail.com> wrote:
> This 8 vs 4 is getting cruftier and cruftier.  (And does it deal
> properly with existing code that already has four spaces because it
> was written recently?)
>
> "Tim" regularly fixes whitespace already, with little damage.
>
> Would it make sense to do a one-time cutover on the 2.6 trunk?
> How about the bugfix branches?
>
> If it is ever going to happen, then immediately after a release,
> before unfreezing, is probably the best time.
>
> -jJ
>
> ---------- Forwarded message ----------
> From: brett.cannon <python-checkins at python.org>
> Date: Aug 31, 2006 6:42 PM
> Subject: [Python-checkins] r51674 - python/trunk/Misc/Vim/vimrc
> To: python-checkins at python.org
>
>
> Author: brett.cannon
> Date: Fri Sep  1 00:42:37 2006
> New Revision: 51674
>
> Modified:
>    python/trunk/Misc/Vim/vimrc
> Log:
> Have pre-existing C files use 8 spaces indents (to match old PEP 7 style), but
> have all new files use 4 spaces (to match current PEP 7 style).
>
>
> Modified: python/trunk/Misc/Vim/vimrc
> ==============================================================================
> --- python/trunk/Misc/Vim/vimrc (original)
> +++ python/trunk/Misc/Vim/vimrc Fri Sep  1 00:42:37 2006
> @@ -19,9 +19,10 @@
>  " Number of spaces to use for an indent.
>  " This will affect Ctrl-T and 'autoindent'.
>  " Python: 4 spaces
> -" C: 4 spaces
> +" C: 8 spaces (pre-existing files) or 4 spaces (new files)
>  au BufRead,BufNewFile *.py,*pyw set shiftwidth=4
> -au BufRead,BufNewFile *.c,*.h set shiftwidth=4
> +au BufRead *.c,*.h set shiftwidth=8
> +au BufNewFile *.c,*.h set shiftwidth=4
>
>  " Number of spaces that a pre-existing tab is equal to.
>  " For the amount of space used for a new tab use shiftwidth.
> _______________________________________________
> Python-checkins mailing list
> Python-checkins at python.org
> http://mail.python.org/mailman/listinfo/python-checkins
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org
>


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list