Skip to content

Instantly share code, notes, and snippets.

Created December 11, 2014 12:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/00b4c39f022d00943a64 to your computer and use it in GitHub Desktop.
Save anonymous/00b4c39f022d00943a64 to your computer and use it in GitHub Desktop.
(defvar my-helm-source-do-ag
`((name . "the silver searcher")
(candidates-process . helm-ag--do-ag-candidate-process)
(persistent-action . helm-ag-persistent-action)
(action . (("Open File" . helm-ag--action-find-file)
("Open File Other Window" . helm-ag--action--find-file-other-window)))
(no-matchplugin)
(nohighlight)
(requires-pattern . 2)
(candidate-number-limit . 200)))
(defun my-helm-mini ()
(interactive)
(require 'helm-files)
(let ((helm-ff-transformer-show-only-basename nil)
(sources '(helm-source-recentf
helm-source-buffers-list)))
(let ((helm-ag-default-directory (or
(with-project-root (cdr project-details))
default-directory)))
(with-library 'helm-ag (add-to-list 'sources 'my-helm-source-do-ag))
(with-library 'helm-git-files (add-to-list 'sources 'helm-git-files:all-source))
(helm-other-buffer sources "*helm mini*"))))
(with-library 'helm
(require 'helm-config)
(global-set-key (kbd "C-c a") 'my-helm-mini))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment