Skip to content

Instantly share code, notes, and snippets.

@davedash
Created February 23, 2010 23:57
Show Gist options
  • Save davedash/312880 to your computer and use it in GitHub Desktop.
Save davedash/312880 to your computer and use it in GitHub Desktop.
runtime plugin/pythonhelper.vim
if !exists("*TagInStatusLine")
function TagInStatusLine()
return ''
endfunction
endif
if !exists("*haslocaldir")
function! HasLocalDir()
return ''
endfunction
else
function! HasLocalDir()
if haslocaldir()
return '[lcd]'
endif
return ''
endfunction
endif
set statusline= " my status line contains:
set statusline+=%n: " - buffer number, followed by a colon
set statusline+=%<%f " - relative filename, truncated from the left
set statusline+=\ " - a space
set statusline+=%h " - [Help] if this is a help buffer
set statusline+=%m " - [+] if modified, [-] if not modifiable
set statusline+=%r " - [RO] if readonly
set statusline+=%2*%{HasLocalDir()}%* " [lcd] if :lcd has been used
set statusline+=\ " - a space
set statusline+=%1*%{TagInStatusLine()}%* " [current class/function]
set statusline+=\ " - a space
set statusline+=%= " - right-align the rest
set statusline+=%-10.(%l,%c%V%) " - line,column[-virtual column]
set statusline+=\ " - a space
set statusline+=%4L " - total number of lines in buffer
set statusline+=\ " - a space
set statusline+=%P " - position in buffer as percentage
set laststatus=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment