mirror of
https://github.com/ernstwi/vim-secret.git
synced 2026-01-29 10:17:12 +08:00
Add mapping <Plug>SecretToggle
This commit is contained in:
parent
33ef0ba3b6
commit
a911e7e891
5 changed files with 29 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue