Added expand_register option.
parent
a051f8c98a
commit
a71ced9846
|
@ -30,6 +30,21 @@ let s:active_register = "\""
|
|||
let s:registry = {}
|
||||
|
||||
|
||||
" FUNCTION: ExpandRegister(reg) {{{1
|
||||
" ==============================================================================
|
||||
" Convenience method to determine which register is being currently used.
|
||||
" The unnamed register defaults to the last used register to avoid having to
|
||||
" constantly prefix registration. This can be changed by setting the value of
|
||||
" g:persist_unnamed_register to 1.
|
||||
|
||||
function! highlight#expand_register(reg)
|
||||
if !g:persist_unnamed_register && a:reg ==# '"'
|
||||
return s:active_register
|
||||
endif
|
||||
return a:reg
|
||||
endfunction
|
||||
|
||||
|
||||
" FUNCTION: ExpandFlag(flag) {{{1
|
||||
" ==============================================================================
|
||||
" Convenience method used to make the mappings in plugin/highlight.vim a bit
|
||||
|
|
Loading…
Reference in New Issue