Peaker / helm-git-grep

helm for git-grep(1)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

helm-git-grep.el licence travis badge melpa badge melpa stable badge

helm for git-grep(1), an incremental git-grep(1).

helm-git-grep

Features

  • Grep submodules too, if submodules exists.
  • Open in other window, other frame, or elscreen.
  • Toggle ignore case option when incremental greping.
  • Save grep result in grep buffer which is writable with wgrep.

Requirements

Installation

If you're an Emacs 24 user or you have a recent version of package.el you can install helm-git-grep.el from the MELPA repository.

Configuration

Add the following to your emacs init file.

(require 'helm-git-grep) ;; Not necessary if installed by package.el
(global-set-key (kbd "C-c g") 'helm-git-grep)
;; Invoke `helm-git-grep' from isearch.
(define-key isearch-mode-map (kbd "C-c g") 'helm-git-grep-from-isearch)
;; Invoke `helm-git-grep' from other helm.
(eval-after-load 'helm
  '(define-key helm-map (kbd "C-c g") 'helm-git-grep-from-helm))

Basic usage

M-x helm-git-grep

Helm git grep. if submodules exists, grep submodules too.

M-x helm-git-grep-at-point

Helm git grep with symbol at point. if submodules exists, grep submodules too.

Actions

These Actions are available.

Action Description
Find file Jump to result.
Find file other frame Jump to result in other frame.
Find file in Elscreen Jump to result in elscreen.
Save results in grep buffer Save helm git grep result in a grep-mode buffer.
Find file other window Jump to result in other window.

Advanced usage

Keymap helm-git-grep-map

These commands are available when executing incremental [git grep] by helm-git-grep.

For more information about keymap, execute C-c ? helm-git-grep-help.

Key Command Description
C-z helm-git-grep-persistent-action Persistent action. With a prefix arg record candidate in mark-ring.
C-c C-o helm-git-grep-run-other-frame-action Jump to result in other frame.
C-c e helm-git-grep-run-elscreen-action Jump to result in elscreen.
C-x C-s helm-git-grep-run-save-buffer Save helm git grep result in a grep-mode buffer.
C-c o helm-git-grep-run-other-window-action Jump to result in other window.
C-c i helm-git-grep-toggle-ignore-case Toggle ignore case option.
C-w helm-yank-text-at-point Yank text at point in invocation buffer into minibuffer.
C-c ? helm-git-grep-help Help command for helm-git-grep.
M-<down> helm-goto-next-file Go to precedent file in helm git grep buffers.
M-<up> helm-goto-precedent-file Go to next file in helm git grep buffers.

C-c i helm-git-grep-toggle-ignore-case

Toggle ignore case option when incremental greping.

The ignore case option is correspond to -i option of git grep.

A buffer name is *helm git grep [i]* with ignore case option.

A buffer name is *helm git grep* without ignore case option.

Customization

Variables

helm-git-grep-candidate-number-limit(Default: 300)

Limit candidate number helm-git-grep.

helm-git-grep-max-length-history(Default: 100)

Max number of elements to save in helm-git-grep-history.

helm-git-grep-use-ioccur-style-keys(Default: t)

Use Arrow keys to jump to occurrences.

Faces

helm-git-grep-match

Face used to highlight git-grep(1) matches.

helm-git-grep-file

Face used to highlight git-grep(1) results filenames.

helm-git-grep-line

Face used to highlight git-grep(1) number lines.

Note

I'm poor at English. Please point out or correct errors in this document, if any.

About

helm for git-grep(1)


Languages

Language:Emacs Lisp 98.3%Language:Makefile 1.7%