]> git.madduck.net Git - etc/vim.git/blobdiff - .vim/bundle/password-store/autoload/password_store.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

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.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '3e3c8f18c7e13b80a0657d48c3c4fa8f55d9eb68'
[etc/vim.git] / .vim / bundle / password-store / autoload / password_store.vim
index fac5202e1fb657fc661fa3c9fa8fbdb5cfc28a9e..5ac486ede111d647de0bec9086edd353fbeca1a0 100644 (file)
@@ -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