1
Fork 0

Added expand_register option.

master
Joshua Potter 2017-05-23 21:04:02 -07:00
parent a051f8c98a
commit a71ced9846
1 changed files with 15 additions and 0 deletions

View File

@ -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