X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/d6c1a4935fbd3f1f1a37f442693b84b78bdc8575..3e3c8f18c7e13b80a0657d48c3c4fa8f55d9eb68:/ftplugin/pass.vim?ds=sidebyside diff --git a/ftplugin/pass.vim b/ftplugin/pass.vim index 66b91c7c..5c8b41e3 100644 --- a/ftplugin/pass.vim +++ b/ftplugin/pass.vim @@ -3,27 +3,7 @@ if exists('did_pass_ftplugin') || &compatible || v:version < 700 endif let g:did_pass = 'did_pass_ftplugin' let s:save_cpo = &cpoptions -set compatible&vim - - -let s:default_settings = { - \ 'pw_length' : '12', - \ 'enable_syntax' : 'true', - \ } - -if ! exists('g:password_store_settings') - let g:password_store_settings = {} -endif - -for s:setting in keys(s:default_settings) - if ! has_key( g:password_store_settings, s:setting ) - let g:password_store_settings[s:setting] = s:default_settings[s:setting] - endif -endfor - -if ! exists('g:password_store_pw_length') - let g:password_store_pw_length = 12 -endif +set cpoptions&vim nmap rotate_password :call password_store#replace() if ! hasmapto( '\rotate_password', 'n') @@ -60,12 +40,12 @@ 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