X-Git-Url: http://47.100.26.94:8080/?a=blobdiff_plain;f=emacs.d%2Femacs-evil.org;h=d04834524d058e1092343b48a577108b49a81109;hb=4e8f8c61c4be30fef35b79795a3f74eb1cfcc122;hp=64a5ec2282007a5e24ebd514e18edc89769211d8;hpb=f2694d7e4ee47fd148e4ac77dc7f64c27fbc8ec9;p=dotfiles.git diff --git a/emacs.d/emacs-evil.org b/emacs.d/emacs-evil.org index 64a5ec2..d048345 100644 --- a/emacs.d/emacs-evil.org +++ b/emacs.d/emacs-evil.org @@ -120,14 +120,17 @@ https://www.emacswiki.org/emacs/Evil. (defun sd/swith-to-buffer () "switch to buffer" (interactive) - (call-interactively 'projectile-switch-to-buffer)) + (if (projectile-project-p) + (projectile-switch-to-buffer) + (ivy-switch-buffer))) + + (ivy-set-actions + 'sd/swith-to-buffer + '(("j" ivy--switch-buffer-other-window-action "other window"))) (with-eval-after-load "evil-leader" (cl-loop for (key . fun ) in '(("F" . counsel-projectile-switch-to-buffer) - ("f" . (lambda () (interactive) - (call-interactively (if (projectile-project-p) - 'projectile-switch-to-buffer - 'ivy-switch-buffer)))) + ("f" . sd/swith-to-buffer) ("b" . counsel-projectile-find-file) ("r" . ivy-recentf) ("w" . save-buffer)