git branch in status line once again
This commit is contained in:
		
							parent
							
								
									beca3fccfb
								
							
						
					
					
						commit
						15b59069e8
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue