Indentation on WinNT
Gordon McMillan
gmcm at hypernet.com
Mon May 3 10:07:12 EDT 1999
Monika Göhmann writes:
>
> the concept of using indentation-only structuring in Python code is
> very nice -- as long as everybody uses Unix and/or reasonable
> settings with their editor.
>
> I have to work with WinNT and when I display code which was
> developed on Unix it sometimes is all messed up looking like this:
>
> if something:
> if something_else:
> do this
> do that
>
> So what does this code do ?
>
> Is there any way to get this displayed correctly with Vim5.3 or any
> other editor ?
This is certainly not a general problem of WIndows vs *nix, both of
which defer all misconceptions about tabs to the viewer / editor.
(Many email clients are totally brain dead about tabs, and show
a leading tab as one space.)
My guess is that you're looking at something written as tab=8,
indent=4 with an editor set for tab=4. If you're using vim, just
reset your tabstops and see if it looks right.
You could also try:
http://www.mcmillan-inc.com/dnld/tabcleaner.py
- Gordon
More information about the Python-list
mailing list