|
|
|
@ -1,21 +1,30 @@
|
|
|
|
|
function! StatuslineGitInfo()
|
|
|
|
|
let git = fugitive#head()
|
|
|
|
|
if git != ''
|
|
|
|
|
return ' '.fugitive#head()
|
|
|
|
|
return " ".fugitive#head()
|
|
|
|
|
else
|
|
|
|
|
return ''
|
|
|
|
|
return ""
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function! StatusLinePaste()
|
|
|
|
|
if &paste
|
|
|
|
|
return "PASTE"
|
|
|
|
|
else
|
|
|
|
|
return ""
|
|
|
|
|
endif
|
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
function! MyStatusLine(mode)
|
|
|
|
|
let statusline = ""
|
|
|
|
|
if a:mode == 'Enter'
|
|
|
|
|
if a:mode == "Enter"
|
|
|
|
|
let statusline .= "%#StatusLineColor#"
|
|
|
|
|
else
|
|
|
|
|
let statusline .= "%#NoStatusLineColor#"
|
|
|
|
|
endif
|
|
|
|
|
let statusline .= "\ %f\ %m%r\ %{StatuslineGitInfo()}\ "
|
|
|
|
|
let statusline .= "\ %f\ %m%r %{StatuslineGitInfo()}\ "
|
|
|
|
|
let statusline .= "%= "
|
|
|
|
|
let statusline .= "\ %{toupper(mode())}"
|
|
|
|
|
let statusline .= "%{toupper(mode())}"
|
|
|
|
|
let statusline .= "\ %{StatusLinePaste()}"
|
|
|
|
|
let statusline .= "%= "
|
|
|
|
|
let statusline .= "\ %y\ %{&fileencoding?&fileencoding:&encoding}\/\%{&fileformat}\ \|\ %l:%c\ "
|
|
|
|
|
return statusline
|
|
|
|
|