From aa8dc3d58a8771f6383bc607546682e3af3dfd7f Mon Sep 17 00:00:00 2001 From: Stefan Etringer Date: Fri, 28 Mar 2025 10:29:28 +0000 Subject: [PATCH] added git appended, modified and removed local lines to git status line --- vim/.vimrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vim/.vimrc b/vim/.vimrc index 59e89cf..e573423 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -142,6 +142,12 @@ function! LinterStatus() abort \) endfunction +" gitgutter: get a list of counts of added, modified, and removed lines in the current buffer +function! GitStatus() + let [a,m,r] = GitGutterGetHunkSummary() + return printf('ap:+%d md: ~%d rm: -%d', a, m, r) +endfunction + set laststatus=2 set statusline= set statusline+=%#PmenuSel# @@ -152,6 +158,7 @@ set statusline+=\ %M set statusline+=\ %r set statusline+=\ %F set statusline+=%= "Right side settings +set statusline+=[%{GitStatus()}] set statusline+=\ [%{LinterStatus()}\] set statusline+=\ %y set statusline+=%#CursorColumn#