Search

Search is one box for everything in the project: file names, the variables and labels of every dataset, and the text of scripts, notebooks, notes, text files and PDFs. Open it with the Search button or Ctrl+Shift+F.

Search results for leverage, with choices to narrow them by kind, where the word was found and file type. Search results for leverage, with choices to narrow them by kind, where the word was found and file type.

Results

Results are ranked with BM25 and show the matching lines. permno ret finds the datasets that have both variables first, then the files that mention both words. Each result says where it matched.

Under the box come choices with counts that narrow the results: by kind, by where the words were found (file name, variables, definitions, code and text, comments, notes), by file type and by project folder. Results can be grouped by kind, folder, file type or project folder, and sorted by relevance, name, date or size.

Opening a result highlights what you searched for: the words in a script or paper, with a bar to step through them, or the matching columns of a dataset.

Searching code

Scripts are read by their syntax:

  • A word inside a name is found: lag finds ret_lag, and mkt finds logMktCap.
  • Scripts that define a function or Stata program, or create a column with gen, df["x"] =, mutate or AS, come first, with the line.
  • Comments can be searched on their own with comment:, or left out (Settings ▸ Search comments).

Filters you can type

FilterFinds
kind:datafiles of one kind
ext:dofiles with an extension
in:rawfiles in a folder
name:, var:words in file names, or dataset variables
tag:crspfiles with a tag
reads:raw, writes:cleanscripts that read or write matching files
uses:leveragescripts that use a name, leaving comments out
def:winsorwhere a function, program or table is defined, or a column is set
comment:todowords in comments
found:where the words were found

The full list is under Search syntax in the app. A search, with its choices, can be saved as a smart folder.

Search matches words, not meaning.