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 let s:default_settings = {
11 \ 'enable_syntax' : 'true',
14 if ! exists('g:password_store_settings')
15 let g:password_store_settings = {}
18 for s:setting in keys(s:default_settings)
19 if ! has_key( g:password_store_settings, s:setting )
20 let g:password_store_settings[s:setting] = s:default_settings[s:setting]
24 if ! exists('g:password_store_pw_length')
25 let g:password_store_pw_length = 12
28 nmap <buffer> <Plug>rotate_password :call password_store#replace()<Cr>
29 if ! hasmapto( '\<Plug>rotate_password', 'n')
30 nmap <C-X> <Plug>rotate_password
36 " Check whether we should set redacting options or not
37 function! s:CheckArgsRedact()
39 " Ensure there's one argument and it's the matched file
40 if argc() != 1 || fnamemodify(argv(0), ':p') !=# expand('<afile>:p')
44 " Disable all the leaky options globally
49 if has('persistent_undo')
53 " Tell the user what we're doing so they know this worked, via a message and
54 " a global variable they can check
55 echomsg 'Editing password file--disabled leaky options!'
56 let g:redact_pass_redacted = 1
60 call s:CheckArgsRedact()
62 function! s:reveal_pass() abort
63 highlight! link password_store_password Comment
65 command! Reveal call <SID>reveal_pass()
67 function! s:conceal_pass() abort
68 highlight! password_store_password guifg=DarkGray guibg=DarkGray ctermfg=8 ctermbg=8
70 command! Conceal call <SID>conceal_pass()
74 let &cpoptions = s:save_cpo