[wingide-users] Editor settings

Walker Hale walkerh at picoscript.com
Mon Aug 7 10:21:45 MDT 2006

Another gotcha is files with mixed tabs and spaces. Wing hates these. In
this situation, Wing does the only safe thing it can do: Wing interprets
each tab as occupying 8 spaces. This is in accordance with the
specifications of the Python language which mandates that a tab shall be
construed as 8 spaces in mixed mode. It is very easy to get mixed-mode files
with most editors. This can happen as easily as accidentally inserting a
space at the beginning of a line that is indented with tabs.

In a situation like this, if you want to edit the file then you need to
convert the file to either all tabs or all spaces.

If Wing's automatic conversion doesn't work, try using regular expressions
to clean up the file. First search for any occurrences of space followed by
tab, and clean them up. After that you can either replace all tabs by 4
spaces or the other way around (which is tricky).


-----Original Message-----
From: wingide-users-bounces at wingware.com
[mailto:wingide-users-bounces at wingware.com] On Behalf Of Wingware Support
Sent: Sunday, August 06, 2006 1:31 PM
To: tony at tcapp.com
Cc: wingide-users at wingware.com
Subject: Re: [wingide-users] Editor settings

Tony Cappellini wrote:
> I've got the editor preferences set for Tab Size 4, default indent sise 4.
> I've loaded a script I had edited with a different editor (and 
> different
> settinngs) a long time ago.

Wing tries to match the existing indent setting for an existing file, so
it's using the indent size of 8 it's apparently deriving from the file. 
  Converting from one indent size to another is something we need to improve
in Wing -- you may be able to convert by converting all indents to tabs and
then converting back to spaces.  You may also want to look into using the
reindent.py script that's distributed with python (it's found in
Tools\Scripts in the win32 distributions).


Wing IDE users list

More information about the wingide-users mailing list