Per-file properties can be set by right-clicking on a source file and selecting the Properties menu item in the popup, by right-clicking on a file in the project view and selecting File Properties, or by opening a file and using the Current File Properties... item in the Source menu. For Debug and Python Settings, values entered here will override any corresponding project-wide values when the selected file is the current file or the main entry point for debugging.
Any string value for a property may contain environment and special variable references, as described in Variable Expansion.
File Type -- This property specifies the file type for a given file, overriding the type determined automatically from its file extension and/or content. This property is recommended only when the Extra File Types preference cannot be used to specify encoding based on filename extension.
Encoding -- This can be used to specify the encoding with which a file will be saved. When it is altered for an already-open file, Wing will offer to reload the file using the new encoding, to only save subsequently using the new encoding, or to cancel the change. Choose to reload if the file was opened with the wrong encoding. For already-open files, the encoding attribute change is only saved if the file is saved. If it is closed without saving, the encoding attribute will revert to its previous setting. The encoding cannot be altered with this property if it is being defined by an encoding comment in a Python, HTML, XML, or gettext PO file. In this case, the file should be opened and the encoding comment changed. Wing will save the file under the newly specified encoding.
Important: Files saved under a different encoding without an encoding comment may not be readable by other editors because there is no way for them to determine the file's encoding if it differs from the system or disk default. Wing stores the selected encoding in the project file, but no mark is written in the file except for those encodings that naturally use a Byte Order Mark (BOM), such as utf_16_le, utf_16_be, utf_32_le, or utf_32_be. Note that standard builds of CPython cannot read source files encoded in utf16 or utf32.
Line Ending Style -- Specifies which type of line ending (line feed, carriage return, or carriage return and line feed) is used in the file. When altered, the file will be opened and changed in an editor. The change does not take effect until the file is saved to disk.
Indent Style -- This property can be used in non-Python files to change the type of indent entered into the file for newly added lines. For Python files, the only way to alter indentation in a file is with the Indentation manager.
Read-only on Disk -- This property reflects whether or not the file is marked read-only on disk. Altering it will change the file's disk protections for the owner of the file (on Posix, group/world permissions are never altered).
These properties define how the file is displayed in the editor:
Show Whitespace -- This allows overriding the Show White Space preference on a per-file basis.
Show EOL -- This allows overriding the Show EOL preference on a per-file basis.
Show Indent Guides -- This allows overriding the Show Indent Guides preference on a per-file basis.
Ignore Indent Errors -- Wing normally reports potentially serious indentation inconsistency in Python files. This property can be used to disable this check on a per-file basis (it is also available in the warning dialog).
Ignore EOL Errors -- When the project's Line Ending Policy is set to warn about line ending mismatches, this property can be used to disable warnings for a particular file.
These properties are the same as for the Python Settings defined in Project-Wide Properties. Values defined per-file override the corresponding project-wide property.
For the Environment attribute, note that the option menu area contains some additional choices. Use Add to Project Values to apply the values specified here to the runtime environment specified by the project, or Add to System Environment to bypass the project-wide values and apply the per-file values directly to the environment set by the operating system.
The per-file debug properties dialog contains all the same fields described in Project-Wide Properties, with the following additions:
Run Arguments -- Enter any run arguments here. Wing does not interpret backslashes ('') on the command line and passes them unchanged to the debug process. The only exceptions to this rule are ' and " (backslash followed by single or double quote), which allow inclusion of quotes inside quoted multi-word arguments.
Show this dialog before each run -- Check this checkbox if you want the debug options dialog to appear each time you start a debug session.
Values defined per-file override or modify the corresponding project-wide property.
When debugging, only per-file debug properties set on the initially invoked file are used. Even if other files with set properties are used in the debug session, any values set for them will be ignored.
The testing tab contains a subset of the fields described in Project-Wide Properties.
|« 3.6.0. Variable Expansion||Table of Contents||4. Source Code Editor »|