Make git branch fit on status line; Sep │ not |
dblume

dblume commited on 2024-03-14 09:54:22
Showing 2 changed files, with 2 additions and 2 deletions.


Note I'm still not actually using git branch on the vim status line,
I don't want all those git calls happening. But it's staged there just
in case I change my mind.
... ...
@@ -74,7 +74,7 @@ set history=500
74 74
 
75 75
 function! StatuslineGit()
76 76
   let l:branchname = system("git -C " . expand('%:p:h') . " rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
77
-  return strlen(l:branchname) > 0 ? ' | branch:'.l:branchname : ''
77
+  return strlen(l:branchname) > 0 ? '  │ '.l:branchname : ''
78 78
 endfunction
79 79
 
80 80
 function! Current_mode()
... ...
@@ -96,7 +96,7 @@ set laststatus=2
96 96
 
97 97
 function! StatuslineGit()
98 98
   let l:branchname = system("git -C " . expand('%:p:h') . " rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
99
-  return strlen(l:branchname) > 0 ? ' | branch:'.l:branchname : ''
99
+  return strlen(l:branchname) > 0 ? '  │ '.l:branchname : ''
100 100
 endfunction
101 101
 
102 102
 function! Current_mode()
103 103