[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5e3c635 59/90: Add a set of commands for resizing minibuff
From: |
Oleh Krehel |
Subject: |
[elpa] master 5e3c635 59/90: Add a set of commands for resizing minibuffer height |
Date: |
Tue, 30 Jun 2015 07:28:43 +0000 |
branch: master
commit 5e3c6358f25118d158347b7a1491239b49195f50
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Add a set of commands for resizing minibuffer height
* ivy.el (ivy-minibuffer-grow): New command.
(ivy-minibuffer-shrink): New command.
* ivy-hydra.el (hydra-ivy): Bind "<" and ">".
Use "C-o >>>>>" to grow the minibuffer, and "C-o <<<<<" to shrink it.
Re #151
---
ivy-hydra.el | 6 ++++--
ivy.el | 13 +++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/ivy-hydra.el b/ivy-hydra.el
index 38a3467..d1ac90e 100644
--- a/ivy-hydra.el
+++ b/ivy-hydra.el
@@ -51,7 +51,7 @@
^^^^^^^^^^^^^^---------------------------------------
^ ^ _k_ ^ ^ _f_ollow _i_nsert _c_: calling %s(if ivy-calling \"on\"
\"off\")
_h_ ^+^ _l_ _d_one _o_ops _m_: matcher %s(if (eq ivy--regex-function
'ivy--regex-fuzzy) \"fuzzy\" \"ivy\")
-^ ^ _j_ ^ ^
+^ ^ _j_ ^ ^ ^ ^ ^ ^ _<_/_>_: shrink/grow window
"
;; arrows
("h" ivy-beginning-of-buffer)
@@ -66,7 +66,9 @@ _h_ ^+^ _l_ _d_one _o_ops _m_: matcher %s(if (eq
ivy--regex-function 'i
("d" ivy-done :exit t)
("C-m" ivy-done :exit t)
("c" ivy-toggle-calling)
- ("m" ivy-toggle-fuzzy))
+ ("m" ivy-toggle-fuzzy)
+ (">" ivy-minibuffer-grow)
+ ("<" ivy-minibuffer-shrink))
(provide 'ivy-hydra)
diff --git a/ivy.el b/ivy.el
index f6bd42c..4facc63 100644
--- a/ivy.el
+++ b/ivy.el
@@ -422,6 +422,19 @@ If the text hasn't changed as a result, forward to
`ivy-alt-done'."
(interactive)
(ivy-set-index (max (- ivy--index ivy-height)
0)))
+(defun ivy-minibuffer-grow ()
+ "Grow the minibuffer window by 1 line"
+ (interactive)
+ (setq-local max-mini-window-height
+ (cl-incf ivy-height)))
+
+(defun ivy-minibuffer-shrink ()
+ "Shrink the minibuffer window by 1 line."
+ (interactive)
+ (unless (<= ivy-height 2)
+ (setq-local max-mini-window-height
+ (cl-decf ivy-height))
+ (window-resize (selected-window) -1)))
(defun ivy-next-line (&optional arg)
"Move cursor vertically down ARG candidates."
- [elpa] master 76897c0 46/90: ivy.el (ivy-sort-functions-alist): Work for commands as well, (continued)
- [elpa] master 76897c0 46/90: ivy.el (ivy-sort-functions-alist): Work for commands as well, Oleh Krehel, 2015/06/30
- [elpa] master 61bb9e0 50/90: Require TRAMP in time, Oleh Krehel, 2015/06/30
- [elpa] master 9df660c 51/90: swiper.el (swiper-query-replace): Don't miss the first, Oleh Krehel, 2015/06/30
- [elpa] master d47dd9b 52/90: ivy-hydra.el: Improve for hydra not installed, Oleh Krehel, 2015/06/30
- [elpa] master 265f47d 53/90: Swiper should not deactivate-mark, Oleh Krehel, 2015/06/30
- [elpa] master 4cdb80c 54/90: ivy-hydra.el (defhydra): Wrap in eval-when-compile, Oleh Krehel, 2015/06/30
- [elpa] master 1dbdcdc 55/90: counsel.el (counsel-M-x): Fixup, Oleh Krehel, 2015/06/30
- [elpa] master bcc5f45 56/90: counsel.el (counsel-M-x): Fixup smex interaction, Oleh Krehel, 2015/06/30
- [elpa] master e238286 57/90: "M-n", "M-p", "M-i" should switch directories when needed, Oleh Krehel, 2015/06/30
- [elpa] master 3f41ce6 58/90: Put the file instead of partial input on history, Oleh Krehel, 2015/06/30
- [elpa] master 5e3c635 59/90: Add a set of commands for resizing minibuffer height,
Oleh Krehel <=
- [elpa] master 7b91a39 60/90: ivy.el (ivy-kill-line): Add and bind to "C-k", Oleh Krehel, 2015/06/30
- [elpa] master dcf0f64 61/90: Add "^" as initial input to "C-h f" and "C-h v", Oleh Krehel, 2015/06/30
- [elpa] master 1ef7e18 62/90: "M-i" should not switch directories, Oleh Krehel, 2015/06/30
- [elpa] master 46695ac 63/90: Fix non-file completions ability to enter tramp completion, Oleh Krehel, 2015/06/30
- [elpa] master a5e49ff 64/90: Make counsel-M-x respect ivy-format-function, Oleh Krehel, 2015/06/30
- [elpa] master 5fcdfb4 65/90: Add better positioning to counsel-git-grep finalizer, Oleh Krehel, 2015/06/30
- [elpa] master 581d8c0 66/90: Don't cut off "/ssh:foo" input, Oleh Krehel, 2015/06/30
- [elpa] master 513a77e 67/90: ivy.el (ivy-alt-done): Find file if given a full tramp path, Oleh Krehel, 2015/06/30
- [elpa] master 972036c 68/90: ivy.el (ivy-alt-done): Enable recursive minibuffers, Oleh Krehel, 2015/06/30
- [elpa] master d9c4427 69/90: Improve performance for "^" initial input, Oleh Krehel, 2015/06/30