Clearing highlighting and better instantiation
parent
620101df7e
commit
d731dd2d87
|
@ -73,6 +73,21 @@ function! highlight#clear_register(reg)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
" FUNCTION: ClearAllRegisters() {{{1
|
||||||
|
" ======================================================================
|
||||||
|
|
||||||
|
function! highlight#clear_all_registers()
|
||||||
|
for key in keys(g:highlight_registry)
|
||||||
|
call highlight#init_register(key, g:highlight_registry[key])
|
||||||
|
endfor
|
||||||
|
for key in keys(s:registry)
|
||||||
|
if !has_key(g:highlight_registry, key)
|
||||||
|
call highlight#clear_register(key)
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
" FUNCTION: CountLastSeen() {{{1
|
" FUNCTION: CountLastSeen() {{{1
|
||||||
" ======================================================================
|
" ======================================================================
|
||||||
|
|
||||||
|
|
|
@ -87,11 +87,18 @@ vmap <silent> * &n<Plug>HRegistry_CountLastSeen
|
||||||
vmap <silent> # &N<Plug>HRegistry_CountLastSeen
|
vmap <silent> # &N<Plug>HRegistry_CountLastSeen
|
||||||
|
|
||||||
|
|
||||||
|
" PROCEDURE: Commands {{1
|
||||||
|
" ======================================================================
|
||||||
|
|
||||||
|
function! s:ClearHighlightRegistry()
|
||||||
|
call highlight#clear_all_registers()
|
||||||
|
endfunction
|
||||||
|
command ClearHighlightRegistry :call <SID>ClearHighlightRegistry()
|
||||||
|
|
||||||
|
|
||||||
" PROCEDURE: Initialize {{{1
|
" PROCEDURE: Initialize {{{1
|
||||||
" ======================================================================
|
" ======================================================================
|
||||||
|
|
||||||
for key in keys(g:highlight_registry)
|
call s:ClearHighlightRegistry()
|
||||||
call highlight#init_register(key, g:highlight_registry[key])
|
|
||||||
endfor
|
|
||||||
call highlight#append_to_search(v:register, @/)
|
call highlight#append_to_search(v:register, @/)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue