[wingide-users] conditional indents

Wingware Support support at wingware.com
Mon Oct 11 07:17:13 MDT 2010

Kurt Bendl wrote:
> I'd like to specify indentation based on file type. For example, I'd
> like XML and HTML files to indent by 2 spaces by default, while
> allowing the default for Python code to be 4 spaces.
> Is this currently possible in WingIDE (And, if so, how might I pull
> this off?)  If not, it's a totally desirable feature in my book. :-)

It's not currently possible to specify this in preferences but since 
Wing matches the existing indentation in a file the preference is only 
used for new files or files that don't already have some indentation in 
them.  So if you set indent size to 2 spaces it should only be the first 
indent in a new Python file where you need to add two spaces manually.  
Of course I can see forgetting that but in that case you can also 
convert 2->4 space indents with the Indentation tool.

There are several reasons that it would be nice to be able to specify 
indentation size/style on a per-file-type basis so we may eventually add 



Stephan Deibel
Wingware | Python IDE
Advancing Software Development


More information about the wingide-users mailing list