All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
1 if exists('did_pass_ftplugin') || &compatible || v:version < 700
4 let g:did_pass = 'did_pass_ftplugin'
5 let s:save_cpo = &cpoptions
9 if ! exists('g:password_store_pw_length')
10 let g:password_store_pw_length = 12
13 nmap <buffer> <Plug>rotate_password :call password_store#replace()<Cr>
14 if ! hasmapto( '\<Plug>rotate_password', 'n')
15 nmap <C-X> <Plug>rotate_password
21 " Check whether we should set redacting options or not
22 function! s:CheckArgsRedact()
24 " Ensure there's one argument and it's the matched file
25 if argc() != 1 || fnamemodify(argv(0), ':p') !=# expand('<afile>:p')
29 " Disable all the leaky options globally
34 if has('persistent_undo')
38 " Tell the user what we're doing so they know this worked, via a message and
39 " a global variable they can check
40 echomsg 'Editing password file--disabled leaky options!'
41 let g:redact_pass_redacted = 1
45 call s:CheckArgsRedact()
47 function! s:reveal_pass() abort
48 highlight! link password_store_password Comment
50 command! Reveal call <SID>reveal_pass()
52 function! s:conceal_pass() abort
53 highlight! password_store_password guifg=DarkGray guibg=DarkGray ctermfg=8 ctermbg=8
55 command! Conceal call <SID>conceal_pass()
59 let &cpoptions = s:save_cpo