How Indent Style is Determined


Home » Support » Index of All Documentation » Wing IDE 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). 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.

« 4.11. IndentationTable of Contents4.11.1. Indentation Preferences »