Closed luiznux closed 2 years ago
Hello ! :)
Thanks for the wonderful project , it's helping me a lot !
But I often find myself full of unnecessary buffers in the same vterm group, as you can see below:
I'm using emacs 27.2 and my current config for centaur-tabs buffer groups and vterm-toggle are:
(defun centaur-tabs-buffer-groups () "`centaur-tabs-buffer-groups' control buffers' group rules. Group centaur-tabs with mode if buffer is derived from `eshell-mode' `emacs-lisp-mode' `dired-mode' `org-mode' `magit-mode'. All buffer name start with * will group to \"Emacs\". Other buffer group by `centaur-tabs-get-group-name' with project name." (list (cond ((or (string-equal "*" (substring (buffer-name) 0 1)) (memq major-mode '(magit-process-mode magit-status-mode magit-diff-mode magit-log-mode magit-file-mode magit-blob-mode magit-blame-mode ))) "Emacs") ((derived-mode-p 'prog-mode) "Editing") ((derived-mode-p 'emacs-lisp-mode) "Elisp") ((derived-mode-p 'dired-mode) "Dired") ((memq major-mode '(helpful-mode help-mode)) "Help") ((memq major-mode '(org-mode org-agenda-clockreport-mode org-src-mode org-agenda-mode org-beamer-mode org-indent-mode org-bullets-mode org-cdlatex-mode org-agenda-log-mode diary-mode)) "OrgMode") (t (centaur-tabs-get-group-name (current-buffer))))))
(use-package vterm-toggle :after vterm :config (global-set-key [f2] 'vterm-toggle) (global-set-key [C-f2] 'vterm-toggle-cd) (define-key vterm-mode-map [(control return)] #'vterm-toggle-insert-cd) (define-key vterm-mode-map (kbd "s-n") 'vterm-toggle-forward) ;Switch to next vterm buffer (define-key vterm-mode-map (kbd "s-p") 'vterm-toggle-backward) ;Switch to previous vterm buffer (setq vterm-toggle-cd-auto-create-buffer nil) (defun myssh() (interactive) (let ((default-directory "/ssh:root@host:~")) (vterm-toggle-cd))) (setq vterm-toggle-fullscreen-p nil) (add-to-list 'display-buffer-alist '((lambda(bufname _) (with-current-buffer bufname (equal major-mode 'vterm-mode))) (display-buffer-reuse-window display-buffer-in-side-window) (side . bottom) (dedicated . t) ;dedicated is supported in emacs27 (reusable-frames . visible) (window-height . 0.3))) (setq centaur-tabs-buffer-groups-function 'vmacs-awesome-tab-buffer-groups) (defun vmacs-awesome-tab-buffer-groups () "`vmacs-awesome-tab-buffer-groups' control buffers' group rules. " (list (cond ((derived-mode-p 'eshell-mode 'term-mode 'shell-mode 'vterm-mode) "Term") ((string-match-p (rx (or "\*Helm" "\*helm" "\*tramp" "\*Completions\*" "\*sdcv\*" "\*Messages\*" "\*Ido Completions\*" )) (buffer-name)) "Emacs") (t "Common")))) (setq vterm-toggle--vterm-buffer-p-function 'vmacs-term-mode-p) (defun vmacs-term-mode-p(&optional args) (derived-mode-p 'eshell-mode 'term-mode 'shell-mode 'vterm-mode)))
For some reason the vterm group is included in the default centaur-tabs * group, along with lsp's auxiliary buffers. I tried a few things without success :/.
Do you think there might be something wrong with my configuration or some bug?
Hello ! :)
Thanks for the wonderful project , it's helping me a lot !
But I often find myself full of unnecessary buffers in the same vterm group, as you can see below:
I'm using emacs 27.2 and my current config for centaur-tabs buffer groups and vterm-toggle are:
For some reason the vterm group is included in the default centaur-tabs * group, along with lsp's auxiliary buffers. I tried a few things without success :/.
Do you think there might be something wrong with my configuration or some bug?