Archaeopteryx Software, Inc.
Take Flight!Search

Home
Wing IDE
News
Support
About Us
Python
Open Source
Store

 Search:
 
 Advanced Search




[wingide-users] What is this other blue line?

Wing IDE Support support at wingide.com
Mon, 3 Feb 2003 10:59:08 -0500 (EST)


On Fri, 31 Jan 2003, Ken Sugino wrote:
> I had trouble with this Indentation Manager. In the past it broke the code
> not properly transforming between spaces and tabs. So I'm pretty scared
> these day to use it.

It's not a tool to use blindly if you've got files with mixed indent
styles.  Wing uses the most common indent style for each file and doesn't
try to understand indent within each block.  However, it shouldn't break
indentation but might just end up indenting some parts more than others
while still maintaining correct relative indent amounts.

However, the indentation manager did have a bug some time ago where
indentation that contained something like <space><space><tab> would have
been broken.  We now ignore the leading spaces properly.

In general, if you run into cases like this where we fall on our faces,
please send us the example.

> But then when I edit source with mixed tabs and spaces these blue
> lines show up and actually it's quite annoying. ;-) Is there a way to
> disable these blue lines?

No, there isn't a way to disable them right now.  Looks to me like there
is indeed a problem with the feature in mixed indent mode.  Perhaps it
should just be turned off in that case... this is a feature of the
underlying source editor widget (Scintilla) and it might just not be
appropriate for mixed indents.  I'll look into it.

> I prefer tab=4 spaces setting. Standard setting is tab=8 spaces. So I'm
> wondering whethere this affects tab/space conversion by indentation manager,
> which can lead to broken code.

The indentation manager uses the source analyser's idea of the indent
style and size for the file.  As noted above, it doesn't try to come up
with a per-block model but instead finds the most common indent style for
the entire file.

The defaults used for new empty files are set in preferences:

edit.tab-size=4
edit.indent-size=4

To alter existing files, you will need to get out the dreaded indentation
manager.  A good conversion path is to go to tabs only first, and then to
spaces only (which allows entering indent size you want to use), and then
optionally to mixed indent style.  This can screw up pretty indentation
of long continued lines, but only cosmetically and in most code these are
rare.

Hope that helps.

Stephan Deibel

--
Wing IDE for Python
Archaeopteryx Software, Inc
Take Flight!

www.wingide.com






Run by Mailman v 2.0.8


Copyright (c) 2000-2002, Archaeopteryx Software, Inc.
Legal Statements