Using tabs instead of spaces in IDLE?
Tom Bryan
tbryan at python.net
Wed Feb 13 21:21:03 EST 2002
Is there a way to use tabs exclusively for indentation in IDLE? Basically,
I'd like tabwidth to equal identwidth while permitting developers to adjust
the indentwidth. I see that AutoIndent.py says
# indentwidth is the number of characters per logical indent level.
# tabwidth is the display width of a literal tab character.
# CAUTION: telling Tk to use anything other than its default
# tab setting causes it to use an entirely different tabbing algorithm,
# treating tab stops as fixed distances from the left margin.
# Nobody expects this, so for now tabwidth should never be changed.
usetabs = 1
indentwidth = 4
tabwidth = 8 # for IDLE use, must remain 8 until Tk is fixed
But I don't quite understand that explanation.
The reason I ask is that I'm going to be introducing Jython to a bunch of
Java developers at work. I expect to get a lot of complaints about blocks
being delimited by whitespace (already got one), and I'd like to be ready
with nice editor configurations so that it's never a practical problem for
our team. Our group's current coding style (for C++ and Java) includes
indentation by tabs. Every developer sets his editor to always insert a
tab when the tab key is pressed, but they adjust the visual display of the
tab size to be whatever they want it to be. It doesn't look like IDLE is
friendly to that type of customization. I know that emacs is. I'm
currently investigating the other editors that my team uses, such as
CodeWright.
Thanks,
---Tom
More information about the Python-list
mailing list