From 8081424a66aed629ee3f9873b3d45a85aa863bb6 Mon Sep 17 00:00:00 2001 From: cashmere Date: Fri, 31 Oct 2025 11:26:49 +0100 Subject: fix all annoying magit behaviour --- config.org | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'config.org') diff --git a/config.org b/config.org index f538060..24fdd33 100644 --- a/config.org +++ b/config.org @@ -84,6 +84,8 @@ (string-match "\\*[^*]+\\*" (buffer-name buffer))) (setq switch-to-prev-buffer-skip 'skip-these-buffers) +(setq switch-to-prev-buffer-skip-regexp + '("\\*[^*]+\\*" "^magit" "^\\*magit")) ;; Configure font settings based on the operating system. ;; Ok, this kickstart is meant to be used on the terminal, not on GUI. @@ -1451,7 +1453,8 @@ ily <3. :config (if ek-use-nerd-fonts ;; Check if nerd fonts are being used (setopt magit-format-file-function #'magit-format-file-nerd-icons)) ;; Turns on magit nerd-icons - ) + :custom + (magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) (defun my/magit-kill-buffers () "kills all magit buffers" (interactive) @@ -1459,6 +1462,9 @@ ily <3. (magit-restore-window-configuration) (mapc #'kill-buffer buffers))) +(setq switch-to-prev-buffer-skip + (lambda (window buffer bury-or-kill) + (string-match-p "\\*magit" (buffer-name buffer)))) #+end_src * indent-guide -- cgit v1.3.1