emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 02cedb7 43/90: ivy.el (ivy-insert-current): Add and bind t


From: Oleh Krehel
Subject: [elpa] master 02cedb7 43/90: ivy.el (ivy-insert-current): Add and bind to "M-i"
Date: Tue, 30 Jun 2015 07:28:24 +0000

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

    ivy.el (ivy-insert-current): Add and bind to "M-i"
    
    Use "M-i" if you want something close to the current candidate. You can
    follow up with an edit and select.
    
    Fixes #141
---
 ivy.el |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/ivy.el b/ivy.el
index 4e646d0..c812466 100644
--- a/ivy.el
+++ b/ivy.el
@@ -122,6 +122,7 @@ Only \"./\" and \"../\" apply here. They appear in reverse 
order."
     (define-key map (kbd "C-M-p") 'ivy-previous-line-and-call)
     (define-key map (kbd "M-q") 'ivy-toggle-regexp-quote)
     (define-key map (kbd "M-j") 'ivy-yank-word)
+    (define-key map (kbd "M-i") 'ivy-insert-current)
     (define-key map (kbd "C-o") 'hydra-ivy/body)
     map)
   "Keymap used in the minibuffer.")
@@ -1344,6 +1345,13 @@ BUFFER may be a string or nil."
     (when amend
       (insert amend))))
 
+(defun ivy-insert-current ()
+  "Make the current candidate into current input.
+Don't finish completion."
+  (interactive)
+  (delete-minibuffer-contents)
+  (insert ivy--current))
+
 (provide 'ivy)
 
 ;;; ivy.el ends here



reply via email to

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