When an existing file is opened, it is scanned to determine what type of indentation is used in that file. If the file contains some indentation, this may override the tab size, indent size, and indent style values given in preferences and the file will be indented in a way that matches its existing content rather than with your configured defaults. If mixed forms of indentation are found, the most common form is used.
For non-Python files, you can change indentation style on the fly using the Indent Style property in the File Properties dialog (accessed by right-clicking on the editor). This allows creating files that intentionally mix indentation forms in different parts of the file. To ask Wing to return to the form of indentation it determines as most prominent in the file, select Match Existing Indents.
For Python files, the Indent Style cannot be altered without converting the whole file's indent style using the Indentation Manager, which can be accessed from the button next to the Indent Style property and from the Tools menu.
Tab size is automatically forced to 8 characters for all Python source files that contain some spaces in indentation. This is done because the Python interpreter defines tabs as 8 characters in size when used together with spaces. This version of Wing does not recognize vi style tab size comments, but it does apply the Tab Size preference when a file contains only tabs in indentation, or if it is a non-Python file.
|« 4.10. Indentation||Table of Contents||4.10.1. Indentation Preferences »|