How Indent Style is Determined

Index of All Documentation » Wing Pro Reference Manual » Source Code Editor » Indentation »

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 and available only in Wing Personal and Wing Pro). 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 (Wing Pro and Wing Personal only), which can be accessed from the button next to the Indent Style property and from the Tools menu.