Dotfiles/site-modules/core/files/vim/plugin/status-line.vim
2022-06-12 20:25:17 +01:00

10 lines
354 B
VimL

" The most basic status line ever
function GitStatus()
return trim(system("git diff --shortstat 2> /dev/null | awk '{print \"+\"$4\" -\"$6}'"))
endfunction
function GitBranch()
return trim(system("git rev-parse --abbrev-ref HEAD 2> /dev/null || echo 'no-git'"))
endfunction
set statusline=\ %y%r\ %m%f:%l:%c%=[%{GitBranch()}]\ %{GitStatus()}\