Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function: change group with ivy #3

Merged
merged 1 commit into from Sep 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 14 additions & 1 deletion awesome-tab.el
Expand Up @@ -420,7 +420,7 @@ Other buffer group by `projectile-project-p' with project name."

(setq tabbar-buffer-groups-function 'tabbar-buffer-groups-by-mixin-rules)

;; Helm source for switch group in helm.
;; Helm source for switching group in helm.
(defvar helm-source-tabbar-group nil)

(defun tabbar-build-helm-source ()
Expand All @@ -433,6 +433,19 @@ Other buffer group by `projectile-project-p' with project name."
:candidates #'tabbar-get-groups
:action '(("Switch to group" . tabbar-switch-group))))))

;; Ivy source for switching group in ivy.
(defvar ivy-source-tabbar-group nil)

(defun tabbar-build-ivy-source ()
(interactive)
(setq ivy-source-tabbar-group
(when (featurep 'ivy)
(require 'ivy)
(ivy-read
"Tabbar Groups:"
(tabbar-get-groups)
:action #'tabbar-switch-group))))

(provide 'awesome-tab)

;;; awesome-tab.el ends here