[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master bb953c6 01/63: ivy.el (ivy-restrict-to-matches): Add and b

From: Oleh Krehel
Subject: [elpa] master bb953c6 01/63: ivy.el (ivy-restrict-to-matches): Add and bind to "S-SPC"
Date: Fri, 21 Aug 2015 12:08:28 +0000

branch: master
commit bb953c60d68952c6c345967d55eed94791cf46cd
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-restrict-to-matches): Add and bind to "S-SPC"
 ivy.el |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ivy.el b/ivy.el
index f64782c..f322b64 100644
--- a/ivy.el
+++ b/ivy.el
@@ -125,6 +125,7 @@ Only \"./\" and \"../\" apply here. They appear in reverse 
     (define-key map (kbd "M-i") 'ivy-insert-current)
     (define-key map (kbd "C-o") 'hydra-ivy/body)
     (define-key map (kbd "C-k") 'ivy-kill-line)
+    (define-key map (kbd "S-SPC") 'ivy-restrict-to-matches)
   "Keymap used in the minibuffer.")
 (autoload 'hydra-ivy/body "ivy-hydra" "" t)
@@ -1483,6 +1484,13 @@ The selected history element will be inserted into the 
                         (insert (substring-no-properties x))
+(defun ivy-restrict-to-matches ()
+  "Restrict candidates to current matches and erase input."
+  (interactive)
+  (delete-minibuffer-contents)
+  (setq ivy--all-candidates
+        (ivy--filter ivy-text ivy--all-candidates)))
 (provide 'ivy)
 ;;; ivy.el ends here

reply via email to

[Prev in Thread] Current Thread [Next in Thread]