Ack-like ToolsThe Simple Emacs Interface to
The program guesses good defaults -- including searching for the thing
at point -- but lets you input
C-u to customize the directory,
commands, switches etc...
Ack is part of GNU ELPA - the official package archive for Emacs:
M-x package-install RET ack RET
M-x ack or do something like
(global-set-key (kbd "C-c
- git grep
M-x ackand provide a pattern to search.
C-u M-x ackto search from current project root.
C-u C-u M-x ackto interactively choose a directory to search.
While reading ack command and args from the minibuffer, the following key bindings may be useful:
M-I=> insert a template for case-insensitive file name search
M-G=> insert a template for
M-Y=> grab the symbol at point from the window before entering the minibuffer
TAB=> completion for ack options
If you use the above keybindings very often, stick the corresponding
command names in
ack-minibuffer-setup-hook. The following snippet
M-x ack insert a
git|hg|bzr grep template if searching
from a project root. Then it will try to insert the symbol at point.
(add-hook 'ack-minibuffer-setup-hook 'ack-skel-vc-grep t) (add-hook 'ack-minibuffer-setup-hook 'ack-yank-symbol-at-point t)
Check out the emacs23 branch.
Phillip Lord. The original author and previous mantainer is Leo Liu.