X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/13b978df5a5f0f9a79a8352c7989c59108d35c29..3e3c8f18c7e13b80a0657d48c3c4fa8f55d9eb68:/autoload/password_store.vim?ds=sidebyside diff --git a/autoload/password_store.vim b/autoload/password_store.vim index fac5202e..5ac486ed 100644 --- a/autoload/password_store.vim +++ b/autoload/password_store.vim @@ -1,14 +1,3 @@ -" setup known state -if exists('did_password_store') - " || &compatible - " || version < 700} - finish -endif -let g:did_password_store = '1' -let s:save_cpo = &cpoptions -set compatible&vim -"echo 'main code'}} -" Return vim to users choice function! password_store#generate() abort if executable('pwgen') let l:result = systemlist('pwgen -N1 ' . password_store#setting('pw_length') ) @@ -33,4 +22,8 @@ function! password_store#setting(key) endif endfunction -let &cpoptions = s:save_cpo +function! password_store#get_highight(group, key) abort + let l:hl_line = execute( 'highlight ' . a:group) + let l:key = matchstr(l:hl_line, a:key . '=\zs\S*') + return l:key +endfunction