diff options
author | Alan Pearce | 2015-08-14 21:43:53 +0200 |
---|---|---|
committer | Alan Pearce | 2015-08-14 21:43:53 +0200 |
commit | 46fcf6ca390af119f649a942cba4fe3721928f96 (patch) | |
tree | 8b4ded098d8f594cef34bbeed31f6183c501c060 /tag-emacs/emacs.d/init.org | |
parent | 4fa45cd1054b526056a0118d324b818eeac7d80e (diff) | |
download | nixfiles-46fcf6ca390af119f649a942cba4fe3721928f96.tar.lz nixfiles-46fcf6ca390af119f649a942cba4fe3721928f96.tar.zst nixfiles-46fcf6ca390af119f649a942cba4fe3721928f96.zip |
Emacs: Better project buffer switching with ivy
Diffstat (limited to 'tag-emacs/emacs.d/init.org')
-rw-r--r-- | tag-emacs/emacs.d/init.org | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 392f76e0..991af461 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1198,7 +1198,16 @@ replace helm and ido. ("<apps>" . counsel-M-x) ("<menu>" . counsel-M-x) ("C-c M-x" . execute-extended-command) - ("C-x C-f" . counsel-find-file))) + ("C-x C-f" . counsel-find-file) + ("C-x b" . counsel-switch-to-projectile-buffer)) + :config (progn + (defun counsel-switch-to-projectile-buffer (arg) + "Forward to `projectile-switch-to-buffer'." + (ivy-read (format "Switch to buffer [%s]: " (projectile-project-name)) + (projectile-project-buffer-names) + :preselect (buffer-name (other-buffer (current-buffer))) + :action #'ivy--switch-buffer-action + :keymap ivy-switch-buffer-map)))) #+END_SRC |