1
Fork 0

Fine grained statusline and better documentation

master
Joshua Potter 2017-05-17 10:10:31 -07:00
parent a70f010d8e
commit 8d3c2915af
3 changed files with 9 additions and 8 deletions

View File

@ -85,10 +85,11 @@ endfunction
" FUNCTION: Statusline() {{{1
" ==============================================================================
" Allow for integrating the currently highlighted section into the statusline.
" Mirrors the look of a given prompted highlight group (e.g. :hi Search)
function! highlight#statusline(...)
let l:group_name = highlight#get_group_name(s:active_register)
return '%#' . l:group_name . '#xxx (" . s:active_register . ")%*'
function! highlight#statusline()
let l:stl = '\' . s:active_register
return l:stl . l:stl . l:stl
endfunction

View File

@ -59,6 +59,11 @@ highlight#statusline()
:set statusline+=%{highlight#statusline()}
If you would like the statusline to be highlighted the same as the active
h_register, use:
:set statusline+=%#Search#%{highlight#statusline()}%*
==============================================================================
Section 3: Commands *highlight-commands*

View File

@ -1,5 +0,0 @@
highlight-commands highlight.txt /*highlight-commands*
highlight-contents highlight.txt /*highlight-contents*
highlight-registry highlight.txt /*highlight-registry*
highlight-statusline highlight.txt /*highlight-statusline*
highlight-usage highlight.txt /*highlight-usage*