;;* Grep
;;** `counsel-ag'
+(defvar counsel-ag-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map (kbd "C-l") 'counsel-git-grep-recenter)
+ (define-key map (kbd "M-q") 'counsel-git-grep-query-replace)
+ map))
+
(defcustom counsel-ag-base-command "ag --nocolor --nogroup %s -- ."
"Format string to use in `cousel-ag-function' to construct the
command. %S will be replaced by the regex string. The default is
'counsel-ag-function
:initial-input initial-input
:dynamic-collection t
+ :keymap counsel-ag-map
:history 'counsel-git-grep-history
:action #'counsel-git-grep-action
:unwind (lambda ()
(call-interactively 'counsel-ag)))
;;** `counsel-grep'
-(defcustom counsel-grep-base-command "grep -nE --ignore-case \"%s\" %s"
+(defcustom counsel-grep-base-command "grep -nE \"%s\" %s"
"Format string to use in `cousel-grep-function' to construct
the command."
:type 'string
:action action
:require-match t
:caller 'counsel-ace-link))))
+;;** `counsel-expression-history'
+;;;###autoload
+(defun counsel-expression-history ()
+ (interactive)
+ (ivy-read "Expr: " (delete-dups read-expression-history)
+ :action #'insert))
;;* Misc OS
;;** `counsel-rhythmbox'