summaryrefslogtreecommitdiff
path: root/config.org
diff options
context:
space:
mode:
authorcashmere <cashmere@autistici.org>2025-10-31 11:26:49 +0100
committercashmere <cashmere@autistici.org>2025-10-31 11:26:49 +0100
commit8081424a66aed629ee3f9873b3d45a85aa863bb6 (patch)
tree9b56766c61ecb0cb503f7ad15267a8091d2e2d84 /config.org
parentc3f6f24ae8c696a7c80ceee5f237aa26e594de9c (diff)
downloademacs-8081424a66aed629ee3f9873b3d45a85aa863bb6.tar.gz
fix all annoying magit behaviour
Diffstat (limited to 'config.org')
-rw-r--r--config.org8
1 files changed, 7 insertions, 1 deletions
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