Question about indentation and bugs
Glyph Lefkowitz
glyph at twistedmatrix.com
Fri Aug 24 00:13:35 EDT 2001
On Fri, Aug 24, 2001 at 02:55:30PM +1200, Greg Ewing wrote:
> There is one thing to keep in mind, though: NEVER MIX TABS AND SPACES IN
> INDENTATION. A given file should be indented using either tabs only or
> spaces only.
Editor hints for making sure this happens:
I have the following lines in my ~/.vimrc:
set list
set listchars=tab:»¿,trail:·
set expandtab tabstop=8
set softtabstop=4 shiftwidth=4
In addition to making sure that I don't ever insert tabs, this displays all
tabs as very obnoxious looking punctuation, so even if they manage to sneak in
through someone else being careless, I can correct them before it's really a
problem.
In my ~/.xemacs/custom.el, I have:
(custom-set-variables
'(whitespace-mode t nil (whitespace-mode)))
(custom-set-faces
'(whitespace-blank-face ((t nil))))
which (assuming you have the same defaults I have) makes all tabs show up in
bright yellow, but spaces don't look odd.
Anyone else have similiar settings for different editors?
--
______ __ __ _____ _ _
| ____ | \_/ |_____] |_____|
|_____| |_____ | | | |
@ t w i s t e d m a t r i x . c o m
http://twistedmatrix.com/users/glyph
More information about the Python-list
mailing list