]> git.madduck.net Git - etc/vim.git/blob - syntax/pass_delayed.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:

b925920211cffc0338be30c02d09eea07affb9ff
[etc/vim.git] / syntax / pass_delayed.vim
1 if exists('b:current_syntax') | finish|  endif
2
3 " set redacted colors from colorscheme
4 let s:error_highlight_str = execute( 'highlight Error' )
5 let s:error_fg = matchstr(s:error_highlight_str, 'guifg=\zs\S*')
6
7 let s:comment_highlight_str = execute( 'highlight Comment' )
8 let s:comment_fg = matchstr(s:comment_highlight_str, 'guifg=\zs\S*')
9
10 " first line (by convention always a single pasword)
11 syntax match password_store_password /\%1l.*/
12 execute 'highlight password_store_password ' .
13             \ ' guibg=' . s:comment_fg .
14             \ ' guifg=' . s:comment_fg .
15             \ ' ctermfg=1 ctermbg=1'
16
17 " highlight short passwords
18 syntax match password_store_password_short /\%1l.\{,6\}$/
19 " highlight password_store_password_short guifg=Red guibg=Red ctermfg=1 ctermbg=1
20 execute 'highlight password_store_password_short ' .
21             \ ' guibg=' . s:error_fg .
22             \ ' guifg=' . s:error_fg .
23             \ ' ctermfg=1 ctermbg=1'
24
25 " colon field value is the suggested path for additional information
26 syntax match password_store_header '\v^[^:]+:'
27 highlight link password_store_header PreProc
28
29