2017-06-09 13:36:58 +02:00
|
|
|
;;; completion/helm/autoload/evil.el -*- lexical-binding: t; -*-
|
2019-04-21 19:59:44 -04:00
|
|
|
;;;###if (featurep! :editor evil)
|
2017-06-09 13:36:58 +02:00
|
|
|
|
2018-09-07 19:36:16 -04:00
|
|
|
;;
|
|
|
|
;; Project searching
|
2018-06-02 20:32:52 +02:00
|
|
|
|
|
|
|
;;;###autoload (autoload '+helm:grep "completion/helm/autoload/evil" nil t)
|
|
|
|
(evil-define-command +helm:grep (all-files-p query)
|
|
|
|
"Ex interface for `+helm/grep'"
|
|
|
|
(interactive "<!><a>")
|
|
|
|
(+helm/grep all-files-p query))
|
|
|
|
|
2017-12-07 21:43:31 -05:00
|
|
|
;;;###autoload (autoload '+helm:ag "completion/helm/autoload/evil" nil t)
|
2018-06-02 20:32:52 +02:00
|
|
|
(evil-define-command +helm:ag (all-files-p query)
|
|
|
|
"Ex interface for `+helm/ag'"
|
|
|
|
(interactive "<!><a>")
|
|
|
|
(+helm/ag all-files-p query))
|
2017-06-09 13:36:58 +02:00
|
|
|
|
2017-12-07 21:43:31 -05:00
|
|
|
;;;###autoload (autoload '+helm:rg "completion/helm/autoload/evil" nil t)
|
2018-06-02 20:32:52 +02:00
|
|
|
(evil-define-command +helm:rg (all-files-p query)
|
|
|
|
"Ex interface for `+helm/rg'"
|
|
|
|
(interactive "<!><a>")
|
|
|
|
(+helm/rg all-files-p query))
|
|
|
|
|
|
|
|
|
|
|
|
;;;###autoload (autoload '+helm:grep-from-cwd "completion/helm/autoload/evil" nil t)
|
|
|
|
(evil-define-command +helm:grep-from-cwd (query &optional recurse-p)
|
|
|
|
"Ex interface for `+helm/grep-from-cwd'."
|
|
|
|
(interactive "<a><!>")
|
|
|
|
(+helm/grep-from-cwd (not recurse-p) query))
|
|
|
|
|
|
|
|
;;;###autoload (autoload '+helm:ag-from-cwd "completion/helm/autoload/evil" nil t)
|
|
|
|
(evil-define-command +helm:ag-from-cwd (query &optional recurse-p)
|
|
|
|
"Ex interface for `+helm/ag-from-cwd'."
|
|
|
|
(interactive "<a><!>")
|
|
|
|
(+helm/ag-from-cwd (not recurse-p) query))
|
|
|
|
|
|
|
|
;;;###autoload (autoload '+helm:rg-from-cwd "completion/helm/autoload/evil" nil t)
|
|
|
|
(evil-define-command +helm:rg-from-cwd (query &optional recurse-p)
|
|
|
|
"Ex interface for `+helm/rg-from-cwd'."
|
|
|
|
(interactive "<a><!>")
|
|
|
|
(+helm/rg-from-cwd (not recurse-p) query))
|
|
|
|
|
2018-05-31 16:16:24 +02:00
|
|
|
|
|
|
|
;;;###autoload
|
|
|
|
(defun +helm--set-prompt-display (pos)
|
|
|
|
"TODO"
|
|
|
|
(let (beg state region-active m)
|
|
|
|
(with-selected-window (minibuffer-window)
|
|
|
|
(setq beg (save-excursion (vertical-motion 0 (helm-window)) (point))
|
|
|
|
state evil-state
|
|
|
|
region-active (region-active-p)
|
|
|
|
m (mark t)))
|
|
|
|
(when region-active
|
|
|
|
(setq m (- m beg))
|
|
|
|
;; Increment pos to handle the space before prompt (i.e `pref').
|
|
|
|
(put-text-property (1+ (min m pos)) (+ 2 (max m pos))
|
|
|
|
'face
|
|
|
|
(list :background (face-background 'region))
|
|
|
|
header-line-format))
|
|
|
|
(put-text-property
|
|
|
|
;; Increment pos to handle the space before prompt (i.e `pref').
|
|
|
|
(+ 1 pos) (+ 2 pos)
|
|
|
|
'face
|
|
|
|
(if (eq state 'insert)
|
|
|
|
'underline
|
|
|
|
;; Don't just use 'cursor, this can hide the current character.
|
|
|
|
(list :inverse-video t
|
|
|
|
:foreground (face-background 'cursor)
|
|
|
|
:background (face-background 'default)))
|
|
|
|
header-line-format)))
|