Fwd: [Python-checkins] r51674 - python/trunk/Misc/Vim/vimrc
![](https://secure.gravatar.com/avatar/d91ce240d2445584e295b5406d12df70.jpg?s=120&d=mm&r=g)
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@python.org> Date: Aug 31, 2006 6:42 PM Subject: [Python-checkins] r51674 - python/trunk/Misc/Vim/vimrc To: python-checkins@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@python.org http://mail.python.org/mailman/listinfo/python-checkins
![](https://secure.gravatar.com/avatar/047f2332cde3730f1ed661eebb0c5686.jpg?s=120&d=mm&r=g)
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@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@python.org> Date: Aug 31, 2006 6:42 PM Subject: [Python-checkins] r51674 - python/trunk/Misc/Vim/vimrc To: python-checkins@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@python.org http://mail.python.org/mailman/listinfo/python-checkins _______________________________________________ Python-Dev mailing list Python-Dev@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/)
participants (2)
-
Guido van Rossum
-
Jim Jewett