Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   . . .
   Commands by Topic
      Getting Help
      Moving Around
      Changing Text
      . . .
      Miscellaneous
   Command Reference
      . . .
      goto-line
      goto-tag
      grep
      grep-mode
      help
      . . .
   Variable Reference
      abort-file-io
      abort-file-matching
      abort-key
      . . .
      yank-rectangle-to-corner
   . . .

Previous   Up    Next
goto-tag  Command Reference   grep-mode


Epsilon User's Manual and Reference > Command Reference >

grep

Search multiple files or buffers for a pattern.  Alt-F7

This command lets you search a set of files for a pattern. It prompts for the search string and the file pattern. Then it scans the files, accumulating matching lines in the grep buffer. The grep buffer appears in the current window. By default, the grep command interprets the search string as a regular expression. Press Ctrl-T at the search string prompt to toggle regular expression mode. You can also type Ctrl-W or Ctrl-C to toggle word-mode or case-folding searches, respectively.

At the file pattern prompt, you can press <Enter> if you want Epsilon to search the same set of files as before. Type Ctrl-S and Epsilon will type in the directory part of the current buffer's file name; this is convenient when you want to search other files in the same directory as the current file. As at other prompts, you can also press Alt-<Up> key or Alt-Ctrl-P to show a list of your previous responses to the prompt. Use the arrow keys or the mouse to choose a previous response to repeat, and press <Enter>. If you want to edit the response first, press Alt-E.

You can use extended file patterns to search in multiple directories using a pattern like **\*.{c,cpp,h} (which searches in the current directory tree for .c, .cpp, and .h files).

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.

With a numeric argument, grep instead searches through buffers, defaulting to the current buffer. The buffer name pattern may contain the wildcard characters ? to match any single character, * to match zero or more characters, a character class like [^a-zA-Z] to match any non-alphabetic character, or | to separate alternatives. (The buffer-grep command provides this functionality as a separate command.)

In grep mode, alphabetic keys run special grep commands. See the description of the grep-mode command for details. Typing H or "?" in grep mode gives help on grep subcommands.

More info:

Searching Multiple Files
grep-show-absolute-path



Previous   Up    Next
goto-tag  Command Reference   grep-mode


Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.