git branch in status line once again
This commit is contained in:
		
							parent
							
								
									beca3fccfb
								
							
						
					
					
						commit
						15b59069e8
					
				| 
						 | 
					@ -5,7 +5,7 @@ set hlsearch
 | 
				
			||||||
syntax on
 | 
					syntax on
 | 
				
			||||||
filetype plugin on
 | 
					filetype plugin on
 | 
				
			||||||
set tabstop=4 shiftwidth=4 autoindent smartindent expandtab 
 | 
					set tabstop=4 shiftwidth=4 autoindent smartindent expandtab 
 | 
				
			||||||
set mouse=a
 | 
					set mouse=v
 | 
				
			||||||
"set noswapfile
 | 
					"set noswapfile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
" Numbering of lines
 | 
					" Numbering of lines
 | 
				
			||||||
| 
						 | 
					@ -72,7 +72,7 @@ hi CursorLine  cterm=NONE ctermbg=darkgrey ctermfg=white
 | 
				
			||||||
"   return strlen(l:branchname) > 0?'  '.l:branchname.' ':''
 | 
					"   return strlen(l:branchname) > 0?'  '.l:branchname.' ':''
 | 
				
			||||||
" endfunction
 | 
					" endfunction
 | 
				
			||||||
function! UpdateGitBranch()
 | 
					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.' ':''
 | 
					  let b:branchstatus = strlen(l:branchname) > 0? '  '.l:branchname.' ':''
 | 
				
			||||||
endfunction
 | 
					endfunction
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,7 +89,7 @@ set laststatus=2
 | 
				
			||||||
set statusline=
 | 
					set statusline=
 | 
				
			||||||
set statusline+=%#PmenuSel#
 | 
					set statusline+=%#PmenuSel#
 | 
				
			||||||
" set statusline+=%{StatuslineGit()}
 | 
					" set statusline+=%{StatuslineGit()}
 | 
				
			||||||
" set statusline+=%{b:branchstatus}
 | 
					set statusline+=%{b:branchstatus}
 | 
				
			||||||
set statusline+=%#BufTabLineCurrent#
 | 
					set statusline+=%#BufTabLineCurrent#
 | 
				
			||||||
set statusline+=\ %M
 | 
					set statusline+=\ %M
 | 
				
			||||||
set statusline+=\ %r
 | 
					set statusline+=\ %r
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue