Lugaru's Epsilon Programmer's Editor
Context:
|
Epsilon User's Manual and Reference >
Command Reference >
file-query-replace
Replace text in many files. | Shift-F7 |
This command prompts for the text to search for and the replacement
text. Then it prompts for a file name which may contain wildcards.
The command then performs a query-replace on each file that
matches the pattern, going to each occurrence of the search text, and
asking whether or not to replace it.
Epsilon skips over any file with an extension listed in
grep-ignore-file-extensions; by default some binary file types are
excluded.
With a numeric argument, the command instead searches through all
buffers. The buffer name pattern may contain the wildcard characters
? to match any single character, * to match zero or more
characters, or a character class like [^a-zA-Z] to match any
non-alphabetic character.
At each occurrence of the search text, you have these choices:
- Y or <Space>
- replaces and goes to the next match.
- N or <Backspace>
- doesn't replace, but goes to the next match.
- <Esc>
- exits immediately.
- .
- replaces and then exits.
- ^
- backs up to the previous match, as long as it's within the same
file.
- !
- replaces all remaining occurrences in the current file without
prompting, then asks if you want to replace all occurrences without
prompting in all remaining files.
- ,
- replaces the current match but doesn't go to the next match.
- Ctrl-R
- enters a recursive edit, allowing you to modify the buffer
arbitrarily. When you exit the recursive edit with exit-level, the
query-replace continues.
- Ctrl-G
- exits and returns point to its original location in the
current buffer, then asks if you want to look for possible
replacements in the remaining files.
- Ctrl-W
- toggles the state of word mode.
- Ctrl-T
- toggles the state of regular expression mode (see the
description of regex-replace).
- Ctrl-C
- toggles the state of case-folding.
- Any other key
- causes query-replace to exit and any command bound
to that key to execute.
The command doesn't save modified files back to disk. You can use the
save-all-buffers command on Ctrl-X S to do this.
More info:
Replacing
Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.
|