Various aspects of the Search Files tool's behavior and display can be configured. To do this, select Tools > Preferences... and then select Search Files in the list on the left side of the Preferences dialog.
In the Search Parameters view of the Search Files preferences you can configure some aspects of searching operations.
Setting Search Parameter Preferences
Enter a file name pattern to add when invoking the tool from an Editor command in the Pattern to add when no file name is specified box.
Check Match flat file-namestring if you want the tool to match filename component of patterns as a flat string, rather than a name and type. If this option is not selected, then any text after the final .
in the filename is treated as the type and is only matched by similar text after the .
in the pattern. For example, when Match flat file-namestring is not selected, the pattern dir/*p
matches interp.exe
, where the name interp
ends with p
but does not match file.lisp
, where the name file
ends with e
. Conversely, when Match flat file-namestring is selected, dir/*p
matches file.lisp
, where the file-namestring file.lisp
ends with p
, but does not match interp.exe
, where the file-namestring interp.exe
ends with e
.
You can specify a limit on the size of files to search in the Maximum file size to search box. This limit represents the maximum file size in bytes, and typical values can be selected from the dropdown list. If larger files are found during a search, they are skipped and a message ...files skipped because they are bigger than...
appears at the top of the results in the main area.
You can specify a limit on the number of matches displayed by the tool in the Maximum number of matches box. Typical values can be selected from the dropdown list. If more matches are found during a search, you are asked whether to stop searching.
You can configure the display of search results using the Display view.
Setting Display Preferences
Choose a color to display the text of unedited lines that show a match in a file.
Choose a color to display the text of edited lines that show a match in a file.
Check Display a filter to display a box that can be used to restrict which results are displayed. This shown by default.
Check Expand items to list the matches as they are found to cause the items grouped under each file to be expanded while the search is running. The default is to leave them collapsed, allowing you to expand them yourself.
Under Files shown: you can choose how the name of each matching file is displayed in the main results area. The values are:
With separate filename and directory | |
Displays the filename at the start and the complete directory name at the end. | |
As complete names | Displays the full name of the file. |
Relative to the search root | |
Displays the name of the file relative to the root directory specified in the search parameters. |
You can add specify which file types to search in the File Types view.
Setting File Types Preferences
Check Use exclude list if you want to exclude certain file types even though they match the pattern in the Search Specifications boxes. Enter the patterns to exclude in the Exclude box, with multiple patterns separated by whitespace.
Check Use include list if you want to only include certain file types, even if the pattern in the Search Specifications should allow other types. Enter the patterns to include in the Include box, with multiple patterns separated by whitespace.
You cannot choose both of these options simultaneously.
By default, for Grep searches the tool runs grep on non-Windows platforms and a specific supplied grep.exe
on Microsoft Windows. The actual searching utility used can be configured with the variable lw:*grep-command*.
The arguments passed to the searching utility are constructed using the values of lw:*grep-fixed-args* and lw:*grep-command-format*. It is not be necessary to alter the default values unless you use a non-default value of lw:*grep-command* or have a non-standard grep installed.
See the LispWorks® User Guide and Reference Manual for details of these Search Files tool configuration variables.
LispWorks IDE User Guide (Windows version) - 01 Dec 2021 19:38:01