branch: master commit b465c09938f25c3614aa2702f6fecfa67f781c88 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
ivy.el (ivy-switch-buffer): Add a multi-action interface While in "C-o": - Use "s" to make "C-m", "C-j", "C-M-n" and "C-M-p" kill - Use "w" to switch back to normal. Re #164 --- ivy.el | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/ivy.el b/ivy.el index 1c5f5b9..4bb6278 100644 --- a/ivy.el +++ b/ivy.el @@ -1469,7 +1469,13 @@ BUFFER may be a string or nil." (call-interactively 'switch-to-buffer) (ivy-read "Switch to buffer: " 'internal-complete-buffer :preselect (buffer-name (other-buffer (current-buffer))) - :action #'ivy--switch-buffer-action + :action (cons + 1 + '(("default" ivy--switch-buffer-action) + ("kill" + (lambda (x) + (kill-buffer x) + (ivy--reset-state ivy-last))))) :keymap ivy-switch-buffer-map))) (defun ivy-recentf ()