From 15b59069e8a9c216b6f6c816cb7ca63d16f121a0 Mon Sep 17 00:00:00 2001 From: gurkenhabicht Date: Wed, 19 Jul 2023 00:30:51 +0200 Subject: [PATCH] git branch in status line once again --- vim/.vimrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vim/.vimrc b/vim/.vimrc index 9e72c62..30834c0 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -5,7 +5,7 @@ set hlsearch syntax on filetype plugin on set tabstop=4 shiftwidth=4 autoindent smartindent expandtab -set mouse=a +set mouse=v "set noswapfile " Numbering of lines @@ -72,7 +72,7 @@ hi CursorLine cterm=NONE ctermbg=darkgrey ctermfg=white " return strlen(l:branchname) > 0?' '.l:branchname.' ':'' " endfunction function! UpdateGitBranch() - let l:branchname = system("git rev-parse --abbrev-ref head 2>/dev/null | tr -d '\n'") + let l:branchname = system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") let b:branchstatus = strlen(l:branchname) > 0? ' '.l:branchname.' ':'' endfunction @@ -89,7 +89,7 @@ set laststatus=2 set statusline= set statusline+=%#PmenuSel# " set statusline+=%{StatuslineGit()} -" set statusline+=%{b:branchstatus} +set statusline+=%{b:branchstatus} set statusline+=%#BufTabLineCurrent# set statusline+=\ %M set statusline+=\ %r