Commit e89802b5c4c9

Vincent Demeester <vincent@sbr.pm>
2020-10-19 11:36:59
tools/emacs: better vc-mode in modeline…
… no need for the `Git` prefix… Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent c353d66
Changed files (1)
tools
tools/emacs/config/config-appearance.el
@@ -158,7 +158,11 @@ questions.  Else use completion to select the tab to switch to."
                 mode-line-end-spaces
                 (list (propertize " " 'display '(space :align-to (- right 19)))
                       'display-time-string))
-
+  (defadvice vc-mode-line (after me/vc-mode-line () activate)
+    "Strip backend from the VC information."
+    (when (stringp vc-mode)
+      (let ((vc-text (replace-regexp-in-string "^ Git" "" vc-mode)))
+        (setq vc-mode vc-text))))
   (moody-replace-mode-line-buffer-identification)
   (moody-replace-vc-mode))