mirror of
https://github.com/gryf/pythonhelper.git
synced 2025-12-18 12:00:27 +01:00
let user decide where/how to add the StatusLine
Signed-off-by: Oluf Lorenzen <ol@axxeo.de>
This commit is contained in:
@@ -23,6 +23,7 @@
|
|||||||
" 1. Make sure your Vim has python feature on (+python). If not, you will need
|
" 1. Make sure your Vim has python feature on (+python). If not, you will need
|
||||||
" to recompile it with --with-pythoninterp option to the configure script
|
" to recompile it with --with-pythoninterp option to the configure script
|
||||||
" 2. Copy script pythonhelper.vim to the $HOME/.vim/plugin directory
|
" 2. Copy script pythonhelper.vim to the $HOME/.vim/plugin directory
|
||||||
|
" 3. add '%{TagInStatusLine()}' yo your vimrc/statusline
|
||||||
" 3. Run Vim and open any python file.
|
" 3. Run Vim and open any python file.
|
||||||
"
|
"
|
||||||
python << EOS
|
python << EOS
|
||||||
@@ -614,7 +615,7 @@ def findTag(bufferNumber, changedTick):
|
|||||||
# if an appropriate tag has been found, set the description accordingly {{{
|
# if an appropriate tag has been found, set the description accordingly {{{
|
||||||
if (nearestLineNumber > -1):
|
if (nearestLineNumber > -1):
|
||||||
tagInfo = tags[nearestLineNumber]
|
tagInfo = tags[nearestLineNumber]
|
||||||
tagDescription = "[in %s (%s)]" % (tagInfo.fullName, PythonTag.TAG_TYPE_NAME[tagInfo.type],)
|
tagDescription = "%s (%s)" % (tagInfo.fullName, PythonTag.TAG_TYPE_NAME[tagInfo.type],)
|
||||||
# }}}
|
# }}}
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
@@ -745,15 +746,6 @@ autocmd BufDelete * silent call PHBufferDelete()
|
|||||||
" is fired up
|
" is fired up
|
||||||
set updatetime=1000
|
set updatetime=1000
|
||||||
|
|
||||||
" color of the current tag in the status line (bold cyan on black)
|
|
||||||
highlight User1 gui=bold guifg=cyan guibg=black
|
|
||||||
" color of the modified flag in the status line (bold black on red)
|
|
||||||
highlight User2 gui=bold guifg=black guibg=red
|
|
||||||
" the status line will be displayed for every window
|
|
||||||
set laststatus=2
|
|
||||||
" set the status line to display some useful information
|
|
||||||
set stl=%-f%r\ %2*%m%*\ \ \ \ %1*%{TagInStatusLine()}%*%=[%l:%c]\ \ \ \ [buf\ %n]
|
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" vim:foldmethod=marker
|
" vim:foldmethod=marker
|
||||||
|
|||||||
Reference in New Issue
Block a user