aboutsummaryrefslogtreecommitdiff
path: root/.emacs.d/rul-init.d/tabbar.el
blob: 3025828f3254dbf636c4497865f92a640107a7ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(global-set-key (kbd "C-<next>") 'tab-bar-switch-to-next-tab)
(global-set-key (kbd "C-<prior>") 'tab-bar-switch-to-prev-tab)

(setq tab-bar-show t)

(defun my/project-create-tab ()
  (interactive)
  (tab-bar-new-tab)
  (magit-status))

(setq project-switch-commands #'my/project-create-tab)

(defun my/switch-to-tab-buffer ()
  (interactive)
  (if (project-current)
      (call-interactively #'projectile-switch-to-buffer)
    (call-interactively #'switch-to-buffer)))

(global-set-key (kbd "C-x b") #'my/switch-to-tab-buffer)

;; Turn on tab bar mode after startup
(tab-bar-mode 1)
nihil fit ex nihilo