Download Wing IDE Personal Reference Manual

Transcript
65
4.12.4. Search in Files Tool
The dockable Search in Files tools is used to search and replace within sets of files,
or for searching Wing’s documentation. It performs searches in batch and displays a
result list for all found matches.
Searching may span the current editor, a single selected file, all open files, all project
files, or all of Wing’s documentation. Files in a set may be filtered by file type, for
example searching only through Python files in the project.
In addition the options also available in the Search tool, the following choices are available in the Options popup menu:
• Replace Operates On Disk -- Check this to replace text in unopened files
directly on disk. See Replace in Multiple Files for details on this option.
• Omit Binary Files -- Check this to omit any file that appears to contain binary
data.
• Auto-restart Searches -- Check this to restart searching immediately if it is
interupted because a search parameter or the set of files being searched is changed.
• Open First Match -- Check this to automatically open the first batch search
match, even before the result list is clicked upon.
• Show Line Numbers -- Check this to include line numbers in the batch result
area.
• Result File Name -- This is used to select the format of the result file name
shown in the batch result area.
4.12.4.1. Replace in Multiple Files
For searches that operate on open files, replace always occurs in the open file editor and
can be undone or saved to disk subsequently, as with any other edit operation.
When replacing text in batch mode, some of the files being searched may not currently
be open in an editor. In this case, Wing will by default open all altered files and make
changes in newly created editors that remain open until the user saves and closes them
explicitly. This is the safest way to undertake multi-file global replace operations because
it clearly shows which files have been altered and makes it possible to undo changes.
An alternative approach is available by Selecting the Replace Operates on Disk option
from the Options popup. This will cause Wing to change files directly on disk in cases
when there is no currently open editor.