From 5860445da55ac3abc3935c6ffd5e9bb4539225c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Benencia?= Date: Thu, 20 Jul 2023 07:53:35 -0700 Subject: emacs: move everything to ~/.emacs.d --- .emacs.d/rul-init.d/tabbar.el | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .emacs.d/rul-init.d/tabbar.el (limited to '.emacs.d/rul-init.d/tabbar.el') diff --git a/.emacs.d/rul-init.d/tabbar.el b/.emacs.d/rul-init.d/tabbar.el new file mode 100644 index 0000000..a492e85 --- /dev/null +++ b/.emacs.d/rul-init.d/tabbar.el @@ -0,0 +1,25 @@ +(global-set-key (kbd "C-") 'tab-bar-switch-to-next-tab) +(global-set-key (kbd "C-") '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) + +;; Save the desktop session +(desktop-save-mode 1) -- cgit v1.2.3