PageRenderTime 27ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/assets/emacs/emacs.d/elpa/ack-1.10/README.rst

https://github.com/ereslibre/dotfiles
ReStructuredText | 87 lines | 62 code | 25 blank | 0 comment | 0 complexity | b615db11dfef1a54f1489a7472fdf33c MD5 | raw file
  1. ==============================================================
  2. The Simple Emacs Interface to `Ack <http://beyondgrep.com>`_-like Tools
  3. ==============================================================
  4. This package integrates `ack <http://beyondgrep.com>`_ and its large
  5. set of options with `emacs <http://www.gnu.org/software/emacs>`_. The
  6. resulting ``*ack*`` buffer is just like vanilla ``*grep*`` buffer but
  7. the results come from your tool of choice.
  8. Ack-like tools such as `the silver searcher (ag)
  9. <https://github.com/ggreer/the_silver_searcher>`_, `ripgrep (rg)
  10. <https://github.com/BurntSushi/ripgrep>`_ are well supported, as are
  11. ``git grep``, ``hg grep``.
  12. The program guesses good defaults, but lets you give ``C-u`` to
  13. customize directory to search in, as well as the give special commands
  14. and switches.
  15. Just ``M-x ack`` or do something like ``(global-set-key (kbd "C-c
  16. C-g") 'ack)``.
  17. It is part of `GNU ELPA <http://elpa.gnu.org>`_ - the official package
  18. archive for `emacs <http://www.gnu.org/software/emacs>`_. Patches,
  19. feature requests and bug reports are welcome.
  20. Colors are handled using the standard library ``ansi-color.el``
  21. Install
  22. -------
  23. ``M-x package-install RET ack RET``
  24. Screenshots
  25. -----------
  26. * ack
  27. .. figure:: http://i.imgur.com/VwWyzAe.png
  28. :target: http://i.imgur.com/VwWyzAe.png
  29. :alt: ack.png
  30. * git grep
  31. .. figure:: http://i.imgur.com/rwjC4pa.png
  32. :target: http://i.imgur.com/rwjC4pa.png
  33. :alt: ack-git-grep.png
  34. Usage
  35. -----
  36. - Type ``M-x ack`` and provide a pattern to search.
  37. - Type ``C-u M-x ack`` to search from current project root.
  38. - Type ``C-u C-u M-x ack`` to interactively choose a directory to search.
  39. While reading ack command and args from the minibuffer, the following
  40. key bindings may be useful:
  41. - ``M-I`` => insert a template for case-insensitive file name search
  42. - ``M-G`` => insert a template for ``git grep``, ``hg grep`` or ``bzr grep``
  43. - ``M-Y`` => grab the symbol at point from the window before entering
  44. the minibuffer
  45. - ``TAB`` => completion for ack options
  46. If you use the above keybindings very often, stick the corresponding
  47. command names in ``ack-minibuffer-setup-hook``. The following snippet
  48. makes ``M-x ack`` insert a ``git|hg|bzr grep`` template if searching
  49. from a project root. Then it will try to insert the symbol at point.
  50. .. code-block:: lisp
  51. (add-hook 'ack-minibuffer-setup-hook 'ack-skel-vc-grep t)
  52. (add-hook 'ack-minibuffer-setup-hook 'ack-yank-symbol-at-point t)
  53. Emacs23
  54. -------
  55. Check out the `emacs23
  56. <https://github.com/leoliu/ack-el/tree/emacs23>`_ branch.
  57. Bugs
  58. ----
  59. https://github.com/leoliu/ack-el/issues
  60. Contributors
  61. ------------
  62. Phillip Lord. The original author and previous mantainer is Leo Liu.