branch: master commit 4696b890dc5fc5bb15820e98a5d5d82436117d51 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
ivy.el (ivy-switch-buffer-other-window): New command * ivy.el (ivy-mode-map): Remap `switch-to-buffer-other-window' to `ivy-switch-buffer-other-window'. Fixes #361 --- ivy.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ivy.el b/ivy.el index 9bc5fb3..b9579ac 100644 --- a/ivy.el +++ b/ivy.el @@ -215,7 +215,10 @@ Only \"./\" and \"../\" apply here. They appear in reverse order." (defvar ivy-mode-map (let ((map (make-sparse-keymap))) - (define-key map [remap switch-to-buffer] 'ivy-switch-buffer) + (define-key map [remap switch-to-buffer] + 'ivy-switch-buffer) + (define-key map [remap switch-to-buffer-other-window] + 'ivy-switch-buffer-other-window) map) "Keymap for `ivy-mode'.") @@ -2355,6 +2358,15 @@ BUFFER may be a string or nil." :keymap ivy-switch-buffer-map)))) ;;;###autoload +(defun ivy-switch-buffer-other-window () + "Switch to another buffer in another window." + (interactive) + (ivy-read "Switch to buffer in other window: " 'internal-complete-buffer + :preselect (buffer-name (other-buffer (current-buffer))) + :action #'ivy--switch-buffer-other-window-action + :keymap ivy-switch-buffer-map)) + +;;;###autoload (defun ivy-recentf () "Find a file on `recentf-list'." (interactive)