Contents

gui.find

Textadept’s Find & Replace pane.


Fields


_G.events.FIND_WRAPPED (string)

Called when a search for text wraps, either from bottom to top when searching for a next occurrence, or from top to bottom when searching for a previous occurrence. This is useful for implementing a more visual or audible notice when a search wraps in addition to the statusbar message.


find_entry_text (string)

The text in the find entry.


find_label_text (string, Write-only)

The text of the “Find” label. This is primarily used for localization.


find_next_button_text (string, Write-only)

The text of the “Find Next” button. This is primarily used for localization.


find_prev_button_text (string, Write-only)

The text of the “Find Prev” button. This is primarily used for localization.


in_files (bool)

Search for the text in a list of files. The default value is false.


in_files_label_text (string, Write-only)

The text of the “In files” label. This is primarily used for localization.


lua (bool)

Interpret search text as a Lua pattern. The default value is false.


lua_pattern_label_text (string, Write-only)

The text of the “Lua pattern” label. This is primarily used for localization.


match_case (bool)

Searches are case-sensitive. The default value is false.


match_case_label_text (string, Write-only)

The text of the “Match case” label. This is primarily used for localization.


replace_all_button_text (string, Write-only)

The text of the “Replace All” button. This is primarily used for localization.


replace_button_text (string, Write-only)

The text of the “Replace” button. This is primarily used for localization.


replace_entry_text (string)

The text in the replace entry.


replace_label_text (string, Write-only)

The text of the “Replace” label. This is primarily used for localization.


whole_word (bool)

Match only whole-words in searches. The default value is false.


whole_word_label_text (string, Write-only)

The text of the “Whole word” label. This is primarily used for localization.


Functions


find_in_files(utf8_dir)

Searches the utf8_dir or user-specified directory for files that match search text and options and prints the results to a buffer. Use the find_text, match_case, whole_word, and lua fields to set the search text and option flags, respectively. Use FILTER to set the search filter.

Parameters:

See also:


find_incremental()

Begins an incremental find using the command entry. Only the match_case find option is recognized. Normal command entry functionality will be unavailable until the search is finished by pressing Esc ( on Mac OSX | Esc in ncurses).


find_next()

Mimics pressing the “Find Next” button.


find_prev()

Mimics pressing the “Find Prev” button.


focus()

Displays and focuses the Find & Replace pane.


goto_file_in_list(next)

If next is true, goes to the next file found, relative to the file on the current line in the results list. Otherwise goes to the previous file found.

Parameters:


replace()

Mimics pressing the “Replace” button.


replace_all()

Mimics pressing the “Replace All” button.


Tables


FILTER

Table of Lua patterns matching files and folders to exclude when finding in files. Each filter string is a pattern that matches filenames to exclude, with patterns matching folders to exclude listed in a folders sub-table. Patterns starting with ‘!’ exclude files and folders that do not match the pattern that follows. Use a table of raw file extensions assigned to an extensions key for fast filtering by extension. All strings must be encoded in _G._CHARSET, not UTF-8. The default value is lfs.FILTER, a filter for common binary file extensions and version control folders.

See also: