Set evil jump point before counsel-ag (and variants)
This commit is contained in:
parent
ff0b45299e
commit
bf771dcbdb
2 changed files with 6 additions and 4 deletions
|
@ -157,14 +157,15 @@ search current file. See `+ivy-task-tags' to customize what this searches for."
|
|||
|
||||
;;;###autoload
|
||||
(defun +ivy*counsel-ag-function (string)
|
||||
"Advice to 1) get rid of the character limit from `counsel-ag-function' and 2)
|
||||
disable ivy's over-zealous parentheses quoting behavior (if i want literal
|
||||
parentheses, I'll escape them myself).
|
||||
"Advice to get rid of the character limit from `counsel-ag-function' and use
|
||||
`evil-set-jump' if evil is active.
|
||||
|
||||
NOTE This may need to be updated frequently, to meet changes upstream (in
|
||||
counsel-rg)."
|
||||
(if (< (length string) 1) ; <-- modified the character limit
|
||||
(counsel-more-chars 1) ; <--
|
||||
(when (and (featurep 'evil) evil-mode)
|
||||
(evil-set-jump))
|
||||
(let ((default-directory (ivy-state-directory ivy-last))
|
||||
(regex (counsel-unquote-regex-parens
|
||||
(setq ivy--old-re
|
||||
|
|
|
@ -109,7 +109,8 @@ immediately runs it on the current candidate (ending the ivy session)."
|
|||
cmd
|
||||
'(("O" +ivy-git-grep-other-window-action "open in other window"))))
|
||||
|
||||
;; Removes character limit from `counsel-ag-function'
|
||||
;; Removes character limit from `counsel-ag-function' and sets a jump point
|
||||
;; for `evil'.
|
||||
;;
|
||||
;; This may need to be updated frequently, to meet changes upstream.
|
||||
;; counsel-ag, counsel-rg and counsel-pt all use this function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue