X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c3b0f3ce059a88721cdc94ea2a4445d2da9f276d..3e3c8f18c7e13b80a0657d48c3c4fa8f55d9eb68:/ftplugin/pass.vim diff --git a/ftplugin/pass.vim b/ftplugin/pass.vim index f728b00b..5c8b41e3 100644 --- a/ftplugin/pass.vim +++ b/ftplugin/pass.vim @@ -1,10 +1,14 @@ -if exists('did_pass_ftplugin') || &compatible || version < 700 +if exists('did_pass_ftplugin') || &compatible || v:version < 700 finish endif let g:did_pass = 'did_pass_ftplugin' let s:save_cpo = &cpoptions -set compatible&vim +set cpoptions&vim +nmap rotate_password :call password_store#replace() +if ! hasmapto( '\rotate_password', 'n') + nmap rotate_password +endif setlocal nospell @@ -36,15 +40,15 @@ endfunction call s:CheckArgsRedact() function! s:reveal_pass() abort - highlight! link password_store_password Comment + setlocal syntax=pass endfunction command! Reveal call reveal_pass() function! s:conceal_pass() abort - highlight! password_store_password guifg=DarkGray guibg=DarkGray ctermfg=8 ctermbg=8 + setlocal syntax=pass.obfuscated endfunction command! Conceal call conceal_pass() -normal GG +normal! GG " Cleanup at end let &cpoptions = s:save_cpo