[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 4ad1ab2 02/57: ivy.el (ivy-tab-space): New defcustom
From: |
Oleh Krehel |
Subject: |
[elpa] master 4ad1ab2 02/57: ivy.el (ivy-tab-space): New defcustom |
Date: |
Tue, 19 May 2015 14:21:17 +0000 |
branch: master
commit 4ad1ab2f96eeb10d672273cdcca2089ed7ca5286
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-tab-space): New defcustom
* ivy.el (ivy-partial-or-done): Insert an extra space when
`ivy-tab-space' is non-nil. This is useful to complete partially and
start a new group at once.
Fixes #73
---
ivy.el | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/ivy.el b/ivy.el
index 9a0557f..e8204dd 100644
--- a/ivy.el
+++ b/ivy.el
@@ -269,6 +269,10 @@ When ARG is t, exit with current text, ignoring the
candidates."
(t
(ivy-done))))))
+(defcustom ivy-tab-space nil
+ "When non-nil, `ivy-partial-or-done' should insert a space."
+ :type 'boolean)
+
(defun ivy-partial-or-done ()
"Complete the minibuffer text as much as possible.
When called twice in a row, exit the minibuffer with the current
@@ -287,7 +291,8 @@ candidate."
ivy--old-cands))))
(delete-region (minibuffer-prompt-end) (point-max))
(setcar (last parts) new)
- (insert (mapconcat #'identity parts " ") " "))))
+ (insert (mapconcat #'identity parts " ")
+ (if ivy-tab-space " " "")))))
(defun ivy-immediate-done ()
"Exit the minibuffer with the current input."
- [elpa] master updated (e559638 -> 155f2a6), Oleh Krehel, 2015/05/19
- [elpa] master ca91c88 01/57: Add an option for out-of-order matching, Oleh Krehel, 2015/05/19
- [elpa] master 4ad1ab2 02/57: ivy.el (ivy-tab-space): New defcustom,
Oleh Krehel <=
- [elpa] master 41bc3e8 03/57: Ignore case for "TAB", Oleh Krehel, 2015/05/19
- [elpa] master 2c39e10 04/57: "TAB" shouldn't delete input when no candidate, Oleh Krehel, 2015/05/19
- [elpa] master 2d7f287 09/57: Improve "TAB" interaction with `confirm-nonexistent-file-or-buffer', Oleh Krehel, 2015/05/19
- [elpa] master 03ab827 07/57: Merge ivy--collection into ivy-last, Oleh Krehel, 2015/05/19
- [elpa] master dc219b3 12/57: Add counsel-load-library, Oleh Krehel, 2015/05/19
- [elpa] master 8b08cc0 08/57: ivy.el (ivy-done): Simplify and improve, Oleh Krehel, 2015/05/19
- [elpa] master cd083cc 18/57: Add swiper -> avy finalizer, Oleh Krehel, 2015/05/19
- [elpa] master f2a0966 16/57: Add ivy-partial: partial complete without exiting, Oleh Krehel, 2015/05/19
- [elpa] master 386184b 14/57: Merge ivy--update-fn into ivy-last, Oleh Krehel, 2015/05/19
- [elpa] master c5fce64 05/57: Make "TAB" switch directories properly, Oleh Krehel, 2015/05/19