aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--oni-core.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/oni-core.el b/oni-core.el
index 34725b6..c94bb6b 100644
--- a/oni-core.el
+++ b/oni-core.el
@@ -551,5 +551,18 @@ which normally have their errors suppressed."
;; removed along with the other whitespace.
(setq cycle-spacing-actions '((just-one-space -) (delete-all-space -) restore))
+;;; Colorize the unique part of buffers
+
+(defun oni-core-colored-post-forward-angle-brackets (base extra-strings)
+ "Return BASE<EXTRA-STRINGS> with the second part colorized.
+This does the same thing as setting ‘uniquify-buffer-name-style' to
+‘post-forward-angle-brackets', except that it colorizes the unique part
+of the buffer name."
+ (concat base
+ (propertize (concat "<" (mapconcat #'identity extra-strings "/") ">")
+ 'face '(:foreground "#72f1f1"))))
+
+(setq uniquify-buffer-name-style 'oni-core-colored-post-forward-angle-brackets)
+
(provide 'oni-core)
;;; oni-core.el ends here