Interface FindTextInFilesOptions

Options that can be set on a findTextInFiles search.

interface FindTextInFilesOptions {
    afterContext?: number;
    beforeContext?: number;
    encoding?: string;
    exclude?: GlobPattern;
    followSymlinks?: boolean;
    include?: GlobPattern;
    maxResults?: number;
    previewOptions?: TextSearchPreviewOptions;
    useDefaultExcludes?: boolean;
    useGlobalIgnoreFiles?: boolean;
    useIgnoreFiles?: boolean;
}

Properties

afterContext?: number

Number of lines of context to include after each match.

beforeContext?: number

Number of lines of context to include before each match.

encoding?: string

Interpret files using this encoding. See the vscode setting "files.encoding"

exclude?: GlobPattern

A glob pattern that defines files and folders to exclude. The glob pattern will be matched against the file paths of resulting matches relative to their workspace. When undefined, default excludes will apply.

followSymlinks?: boolean

Whether symlinks should be followed while searching. See the vscode setting "search.followSymlinks".

include?: GlobPattern

A glob pattern that defines the files to search for. The glob pattern will be matched against the file paths of files relative to their workspace. Use a relative pattern to restrict the search results to a workspace folder.

maxResults?: number

The maximum number of results to search for

previewOptions?: TextSearchPreviewOptions

Options to specify the size of the result text preview.

useDefaultExcludes?: boolean

Whether to use the default and user-configured excludes. Defaults to true.

useGlobalIgnoreFiles?: boolean

Whether global files that exclude files, like .gitignore, should be respected. See the vscode setting "search.useGlobalIgnoreFiles".

useIgnoreFiles?: boolean

Whether external files that exclude files, like .gitignore, should be respected. See the vscode setting "search.useIgnoreFiles".