Auto-Reloading Changed Files

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


Wing's editor detects when files have been changed outside of the IDE and can reload files into its editor. This is useful when working with an external editor, or when using code generation tools that rewrite files.

The default behavior is to automatically reload externally changed files that have not yet been changed within Wing's source editor, and to prompt to reload files that have also been changed in the IDE.

You can change these behaviors with the the Files > Reloading > Reload when Unchanged and Files > Reloading > Reload when Changed preferences

By default, reloading will close files that disappeared on disk. This is the recommended behavior when a revision control system is in use, because updates or branch switches that occur while Wing is running may remove open files. However, this behavior can be overridden with the Files > Reloading > Reloading Deleted Disk Files preference. Using Prompt for Action instead reduces the chances of entirely losing a file if the file is accidentally deleted on disk.

On Windows, Wing uses a signal from the OS to detect changes so notification or reload is usually instant. On Linux and Unix, Wing polls the disk by default every 5 seconds. This frequency can be changed with the Files > Reloading > External Check Freq preference.

Before reloading a file with changed modification time, Wing checks the contents of the file and avoids reloading it into the editor when its contents remains unchanged. This check is skipped for files larger than 5MB and it may be disabled entirely with the Files > Reloading > Check Hash Before Reloading preference. This may be needed when working with a slow network disk, where the process of checking the contents of files slows down Wing more than reloading unchanged files.