Add mapping <Plug>SecretToggle

This commit is contained in:
Ernst Widerberg 2021-01-30 12:09:05 +01:00
parent 33ef0ba3b6
commit a911e7e891
5 changed files with 29 additions and 2 deletions

View file

@ -164,3 +164,11 @@ function! secret#secret(enable, ...)
call s:disable()
endif
endfunction
function! secret#toggle()
if !exists('w:secret_state') || !has_key(w:secret_state, bufnr())
call secret#secret(1)
else
call secret#secret(0)
endif
endfunction