Lugaru's Epsilon
Programmer's
Editor 14.00

Context:
Epsilon User's Manual and Reference
   . . .
   Commands by Topic
      Getting Help
      Moving Around
      Changing Text
      . . .
      Miscellaneous
   Command Reference
      . . .
      exit-process
      export-colors
      file-query-replace
      fill-comment
      fill-indented-paragraph
      . . .
   Variable Reference
      abort-file-io
      abort-file-matching
      abort-key
      . . .
      yank-rectangle-to-corner
   . . .

Previous   Up    Next
export-colors  Command Reference   fill-comment


Epsilon User's Manual and Reference > Command Reference >

file-query-replace

Replace text in many files or buffers.  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.

If the use-grep-ignore-file-variables variable is nonzero, Epsilon skips over any file with an extension listed in grep-ignore-file-extensions; by default some binary file types are excluded, or those that match the grep-ignore-file-basename, grep-ignore-file-pattern, or grep-ignore-file-types variables, or those bigger than grep-ignore-file-max-size.

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.

. (<Period>)
replaces and then exits.

^ (<Caret>)
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.

, (<Comma>)
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 replacement 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 the command to skip to the next file.

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



Previous   Up    Next
export-colors  Command Reference   fill-comment


Lugaru Epsilon Programmer's Editor 14.00 manual. Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.