Module textadept.find
Textadept's integrated find/replace dialog.
Fields
find_entry_text
: The text in the find entry.replace_entry_text
: The text in the replace entry.match_case
: Flag indicating whether or not case-sensitive search is performed.whole_word
: Flag indicating whether or not only whole-word matches are allowed in searches.lua
: Flag indicating whether or not the text to find in a search is a Lua pattern.in_files
: Flag indicating whether or not to search for the text in a list of files.
Overview
In addition to offering standard find and replace, Textadept allows you to
find with Lua patterns and replace with Lua captures and even
Lua code! Lua captures (%n
) are only available from a Lua pattern search,
but embedded Lua code enclosed in %()
is always available.
If any block of text is selected for 'Replace All', only matches found in that block are replaced.
Find in Files will prompt for a directory to recursively search and display the results in a new buffer. Double-clicking a search result will jump to it in the file. Replace in Files is not supported. You will have to Find in Files first, and then 'Replace All' for each file a result is found in. The 'Match Case', 'Whole Word', and 'Lua pattern' flags still apply.
Incremental search uses the Command Entry.
Customizing Look and Feel
There is no way to theme the dialog from within Textadept. Instead you can
use GTK Resource files. The find and replace entries have widget
names of textadept-find-entry
and textadept-replace-entry
respectively.
Fields
find_entry_text
: The text in the find entry.replace_entry_text
: The text in the replace entry.match_case
: Flag indicating whether or not case-sensitive search is performed.whole_word
: Flag indicating whether or not only whole-word matches are allowed in searches.lua
: Flag indicating whether or not the text to find in a search is a Lua pattern.in_files
: Flag indicating whether or not to search for the text in a list of files.
Overview
In addition to offering standard find and replace, Textadept allows you to
find with Lua patterns and replace with Lua captures and even
Lua code! Lua captures (%n
) are only available from a Lua pattern search,
but embedded Lua code enclosed in %()
is always available.
If any block of text is selected for 'Replace All', only matches found in that block are replaced.
Find in Files will prompt for a directory to recursively search and display the results in a new buffer. Double-clicking a search result will jump to it in the file. Replace in Files is not supported. You will have to Find in Files first, and then 'Replace All' for each file a result is found in. The 'Match Case', 'Whole Word', and 'Lua pattern' flags still apply.
Incremental search uses the Command Entry.
Customizing Look and Feel
There is no way to theme the dialog from within Textadept. Instead you can
use GTK Resource files. The find and replace entries have widget
names of textadept-find-entry
and textadept-replace-entry
respectively.
Fields
find_entry_text
: The text in the find entry.replace_entry_text
: The text in the replace entry.match_case
: Flag indicating whether or not case-sensitive search is performed.whole_word
: Flag indicating whether or not only whole-word matches are allowed in searches.lua
: Flag indicating whether or not the text to find in a search is a Lua pattern.in_files
: Flag indicating whether or not to search for the text in a list of files.
Overview
In addition to offering standard find and replace, Textadept allows you to
find with Lua patterns and replace with Lua captures and even
Lua code! Lua captures (%n
) are only available from a Lua pattern search,
but embedded Lua code enclosed in %()
is always available.
If any block of text is selected for 'Replace All', only matches found in that block are replaced.
Find in Files will prompt for a directory to recursively search and display the results in a new buffer. Double-clicking a search result will jump to it in the file. Replace in Files is not supported. You will have to Find in Files first, and then 'Replace All' for each file a result is found in. The 'Match Case', 'Whole Word', and 'Lua pattern' flags still apply.
Incremental search uses the Command Entry.
Customizing Look and Feel
There is no way to theme the dialog from within Textadept. Instead you can
use GTK Resource files. The find and replace entries have widget
names of textadept-find-entry
and textadept-replace-entry
respectively.
Functions
find_next () | Mimicks a press of the 'Find Next' button in the Find box. |
find_prev () | Mimicks a press of the 'Find Prev' button in the Find box. |
focus () | Displays and focuses the find/replace dialog. |
goto_file_in_list (next) | Goes to the next or previous file found relative to the file on the current line. |
incremental () | Begins an incremental find using the Lua command entry. |
replace () | Mimicks a press of the 'Replace' button in the Find box. |
replace_all () | Mimicks a press of the 'Replace All' button in the Find box. |
Functions
- find_next ()
- Mimicks a press of the 'Find Next' button in the Find box.
- find_prev ()
- Mimicks a press of the 'Find Prev' button in the Find box.
- focus ()
- Displays and focuses the find/replace dialog.
- goto_file_in_list (next)
-
Goes to the next or previous file found relative to the file on the current line.
Parameters
- next: Flag indicating whether or not to go to the next file.
- incremental ()
- Begins an incremental find using the Lua command entry. Lua command functionality will be unavailable until the search is finished (pressing 'Escape' by default).
- replace ()
- Mimicks a press of the 'Replace' button in the Find box.
- replace_all ()
- Mimicks a press of the 'Replace All' button in the Find box.