VIM: Hides git branch "blob" on status line if not in a git project

This commit is contained in:
Jonathan Hodgson 2020-12-14 11:27:14 +00:00
parent e95aef3c0d
commit a4a520aa02

View file

@ -85,10 +85,13 @@ function! DetectMode(mode)
" git branch
if exists("*FugitiveHead")
let head = FugitiveHead()
if head != ''
let statusline .= "%#GruvboxBg4#\ " . left
let statusline .= "%#PmenuThumb#%{FugitiveHead()}"
let statusline .= "%#PmenuThumb#" . head
let statusline .= "%#GruvboxBg4#" . right . "\ "
endif
endif
" Filetype
let statusline .= "%#GruvboxBlue#\ " . left