summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2015-08-14 21:55:50 +0200
committerAlan Pearce2015-08-14 21:55:50 +0200
commit8708c364ce3ab538307369885709ac67f1f9a2bb (patch)
tree28df3d8b42124ac78c431b4b6c8565e0009fe306 /tag-emacs
parent46fcf6ca390af119f649a942cba4fe3721928f96 (diff)
downloaddotfiles-8708c364ce3ab538307369885709ac67f1f9a2bb.tar.lz
dotfiles-8708c364ce3ab538307369885709ac67f1f9a2bb.tar.zst
dotfiles-8708c364ce3ab538307369885709ac67f1f9a2bb.zip
Emacs: Add ivy-switch-buffer action to kill buffer
Diffstat (limited to 'tag-emacs')
-rw-r--r--tag-emacs/emacs.d/init.org6
1 files changed, 5 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 991af46..ffb1f31 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -1185,7 +1185,11 @@ replace helm and ido.
     :config (progn
               (setq ivy-use-virtual-buffers t
                     ivy-re-builders-alist '((internal-complete-buffer . ivy--regex-fuzzy)
-                                            (t . ivy--regex-plus))))
+                                            (t . ivy--regex-plus)))
+              (ivy-set-actions 'ivy-switch-buffer '(("k" (lambda (x)
+                                                           (kill-buffer x)
+                                                           (ivy--reset-state ivy-last))
+                                                     "kill"))))
     :init (progn
             (ivy-mode 1)))
 #+END_SRC