Emacs Interface to Ack-like Tools
Emacs Lisp
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.rst
ack.el
pcmpl-ack.el

README.rst

Emacs Interface to Ack-like Tools

This package brings the full power of ack to emacs by allowing you to run it seamlessly with its large set of options. Ack-like tools such as the silver searcher and git/hg/bzr grep are well supported too.

It is part of GNU ELPA - the official package archive for emacs. Patches, feature requests and bug reports are welcome.

Features

  • Keep all features of ack and more
  • Handle colors using the standard library ansi-color.el
  • Completion for ack options while reading from the minibuffer
  • Support the silver search (ag)
  • Support git grep, hg grep and bzr grep

Install

M-x package-install RET ack RET

Screenshots

  • ack
ack.png
  • git grep
ack-git-grep.png

Usage

  • Type M-x ack and provide a pattern to search.
  • Type C-u M-x ack to search from current project root.
  • Type C-u C-u M-x ack to 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 git grep, hg grep or bzr grep
  • 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 makes 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)

Emacs23

Check out the emacs23 branch.

Bugs

https://github.com/leoliu/ack-el/issues

Contributors

Phillip Lord. The original author and previous mantainer is Leo Liu.