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
8 nmap <buffer> <Plug>rotate_password :call password_store#replace()<Cr>
9 if ! hasmapto( '\<Plug>rotate_password', 'n')
10 nmap <C-X> <Plug>rotate_password
16 " Check whether we should set redacting options or not
17 function! s:CheckArgsRedact()
19 " Ensure there's one argument and it's the matched file
20 if argc() != 1 || fnamemodify(argv(0), ':p') !=# expand('<afile>:p')
24 " Disable all the leaky options globally
29 if has('persistent_undo')
33 " Tell the user what we're doing so they know this worked, via a message and
34 " a global variable they can check
35 echomsg 'Editing password file--disabled leaky options!'
36 let g:redact_pass_redacted = 1
40 call s:CheckArgsRedact()
42 function! s:reveal_pass() abort
43 highlight! link password_store_password Comment
45 command! Reveal call <SID>reveal_pass()
47 function! s:conceal_pass() abort
48 highlight! password_store_password guifg=DarkGray guibg=DarkGray ctermfg=8 ctermbg=8
50 command! Conceal call <SID>conceal_pass()
53 augroup password_settings_late_load
55 autocmd FileReadPost if &filetype == 'pass' | echom 'autocmd triggered' | let b:load_pass_syntax = 1 | source 'syntax/pass.vim' | endif
58 let &cpoptions = s:save_cpo