X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/c3b0f3ce059a88721cdc94ea2a4445d2da9f276d..5e46c4df650e55e4f00295f9063486b32a664019:/ftplugin/pass.vim?ds=sidebyside diff --git a/ftplugin/pass.vim b/ftplugin/pass.vim index f728b00..1373778 100644 --- a/ftplugin/pass.vim +++ b/ftplugin/pass.vim @@ -1,4 +1,4 @@ -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' @@ -6,6 +6,15 @@ let s:save_cpo = &cpoptions set compatible&vim +if ! exists('g:password_store_pw_length') + let g:password_store_pw_length = 12 +endif + +nmap rotate_password :call password_store#replace() +if ! hasmapto( '\rotate_password', 'n') + nmap rotate_password +endif + setlocal nospell @@ -44,7 +53,7 @@ function! s:conceal_pass() abort highlight! password_store_password guifg=DarkGray guibg=DarkGray ctermfg=8 ctermbg=8 endfunction command! Conceal call conceal_pass() -normal GG +normal! GG " Cleanup at end let &cpoptions = s:save_cpo