Skip to content

Find in Files

Find in files searches every file in a folder, including its subfolders, for a piece of text. It is a sidebar panel, available while a file is open. Open it with Ctrl + Shift + D, the folder icon in the sidebar rail, or More actions (…) → Find in files.

  1. In the Directory… box, type the path of a folder, or select Browse to choose one.

  2. Optionally, type glob patterns in the second box to search only some files, for example *.log, *.txt. Leave it empty to search every file. See Choose files with glob patterns.

  3. Type the text to find in the Search pattern… box.

  4. Optionally, select Aa to ignore case, or W to match whole words only.

  5. Press Enter or select Search.

Find in files matches plain text only. It has no regular expressions, hex bytes, or Str mode. Aa ignores case for the ASCII letters A to Z only, and W works as described in Search modes.

While the search runs, the panel shows how many files it has searched out of the total, the number of matches so far, and a progress bar. When it finishes, it shows the number of matches and files and the time, or No matches found.

A glob pattern describes file names with wildcards. Separate several patterns with commas. Vaste searches a file if any pattern matches its name or its path inside the folder.

Pattern Files searched
*.log Every .log file, in the folder and all its subfolders
*.log, *.txt Every .log and .txt file
app-*.log .log files whose names start with app-
logs/*.log .log files in the logs subfolder, including its own subfolders
*.{log,out} Every .log and .out file
Empty Every file

Patterns are case-sensitive: *.log does not match APP.LOG. There is no way to exclude files. If a pattern is not valid, the panel shows Invalid glob and the pattern.

Find in files searches every subfolder, at any depth, including hidden files and folders. It does not follow symbolic links and does not read .gitignore files.

Vaste skips these files without reporting them:

  • Binary files: files with a NUL byte near the start, whatever their extension. This also skips files encoded as UTF-16, even .txt and .log files that Vaste opens in Text view, and compressed files such as .gz archives.
  • Files it cannot read, for example because of permissions.

Vaste looks for the UTF-8 bytes of your text in each file. In a file with another encoding, such as windows-1252, non-ASCII text does not match, and the result lines can show � in place of some characters.

Results are grouped by file. Each group shows the end of the file’s path and its number of matches; hover over the path to see all of it. Files appear in the order Vaste finishes them, not sorted by name. Each row shows the line number and the line.

Select a row to open the result:

  • If the row is in another file, Vaste opens that file in the current window, in place of the open file, and scrolls to the line.
  • If the row is in the open file, Text view scrolls to the line.

Find in files lists up to 10,000 matches. When it reaches the limit, the panel shows capped at 10,000, and the total can end slightly above 10,000.

Select Cancel while the search runs. The panel keeps the results found so far. Press Esc or select the close button (Close (Escape)) to close the panel.

Select the clock icon (Recent searches) to see your last 8 searches. Select one to fill in its folder, glob patterns, text, Aa, and W, then press Enter to run it. Clear history empties the list.

The list lasts until you quit Vaste. Closing the open file, or opening another file in the window, clears the panel’s boxes and results but keeps the list.