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 | |
parent | 4fa45cd1054b526056a0118d324b818eeac7d80e (diff) | |
download | dotfiles-46fcf6ca390af119f649a942cba4fe3721928f96.tar.lz dotfiles-46fcf6ca390af119f649a942cba4fe3721928f96.tar.zst dotfiles-46fcf6ca390af119f649a942cba4fe3721928f96.zip |
Emacs: Better project buffer switching with ivy
Diffstat (limited to 'tag-emacs')
-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 392f76e..991af46 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 |