1" Vim syntax file
2" Language:         gpg(1) configuration file
3" Maintainer:       Nikolai Weibull <now@bitwi.se>
4" Latest Revision:  2007-06-17
5
6if exists("b:current_syntax")
7  finish
8endif
9
10let s:cpo_save = &cpo
11set cpo&vim
12
13setlocal iskeyword+=-
14
15syn keyword gpgTodo     contained FIXME TODO XXX NOTE
16
17syn region  gpgComment  contained display oneline start='#' end='$'
18                        \ contains=gpgTodo,gpgID,@Spell
19
20syn match   gpgID       contained display '\<\(0x\)\=\x\{8,}\>'
21
22syn match   gpgBegin    display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand
23
24syn keyword gpgCommand  contained skipwhite nextgroup=gpgArg
25                        \ check-sigs decrypt decrypt-files delete-key
26                        \ delete-secret-and-public-key delete-secret-key
27                        \ edit-key encrypt-files export export-all
28                        \ export-ownertrust export-secret-keys
29                        \ export-secret-subkeys fast-import fingerprint
30                        \ gen-prime gen-random import import-ownertrust
31                        \ list-keys list-public-keys list-secret-keys
32                        \ list-sigs lsign-key nrsign-key print-md print-mds
33                        \ recv-keys search-keys send-keys sign-key verify
34                        \ verify-files
35syn keyword gpgCommand  contained skipwhite nextgroup=gpgArgError
36                        \ check-trustdb clearsign desig-revoke detach-sign
37                        \ encrypt gen-key gen-revoke help list-packets
38                        \ rebuild-keydb-caches sign store symmetric
39                        \ update-trustdb version warranty
40
41syn keyword gpgOption   contained skipwhite nextgroup=gpgArg
42                        \ attribute-fd cert-digest-algo charset cipher-algo
43                        \ command-fd comment completes-needed compress
44                        \ compress-algo debug default-cert-check-level
45                        \ default-key default-preference-list
46                        \ default-recipient digest-algo disable-cipher-algo
47                        \ disable-pubkey-algo encrypt-to exec-path
48                        \ export-options group homedir import-options
49                        \ keyring keyserver keyserver-options load-extension
50                        \ local-user logger-fd marginals-needed max-cert-depth
51                        \ notation-data options output override-session-key
52                        \ passphrase-fd personal-cipher-preferences
53                        \ personal-compress-preferences
54                        \ personal-digest-preferences photo-viewer
55                        \ recipient s2k-cipher-algo s2k-digest-algo s2k-mode
56                        \ secret-keyring set-filename set-policy-url status-fd
57                        \ trusted-key verify-options
58syn keyword gpgOption   contained skipwhite nextgroup=gpgArgError
59                        \ allow-freeform-uid allow-non-selfsigned-uid
60                        \ allow-secret-key-import always-trust
61                        \ armor ask-cert-expire ask-sig-expire
62                        \ auto-check-trustdb batch debug-all default-comment
63                        \ default-recipient-self dry-run emit-version
64                        \ emulate-md-encode-bug enable-special-filenames
65                        \ escape-from-lines expert fast-list-mode
66                        \ fixed-list-mode for-your-eyes-only
67                        \ force-mdc force-v3-sigs force-v4-certs
68                        \ gpg-agent-info ignore-crc-error ignore-mdc-error
69                        \ ignore-time-conflict ignore-valid-from interactive
70                        \ list-only lock-multiple lock-never lock-once
71                        \ merge-only no no-allow-non-selfsigned-uid
72                        \ no-armor no-ask-cert-expire no-ask-sig-expire
73                        \ no-auto-check-trustdb no-batch no-comment
74                        \ no-default-keyring no-default-recipient
75                        \ no-encrypt-to no-expensive-trust-checks
76                        \ no-expert no-for-your-eyes-only no-force-v3-sigs
77                        \ no-force-v4-certs no-greeting no-literal
78                        \ no-mdc-warning no-options no-permission-warning
79                        \ no-pgp2 no-pgp6 no-pgp7 no-random-seed-file
80                        \ no-secmem-warning no-show-notation no-show-photos
81                        \ no-show-policy-url no-sig-cache no-sig-create-check
82                        \ no-sk-comments no-tty no-utf8-strings no-verbose
83                        \ no-version not-dash-escaped openpgp pgp2
84                        \ pgp6 pgp7 preserve-permissions quiet rfc1991
85                        \ set-filesize show-keyring show-notation show-photos
86                        \ show-policy-url show-session-key simple-sk-checksum
87                        \ sk-comments skip-verify textmode throw-keyid
88                        \ try-all-secrets use-agent use-embedded-filename
89                        \ utf8-strings verbose with-colons with-fingerprint
90                        \ with-key-data yes
91
92syn match   gpgArg      contained display '\S\+\(\s\+\S\+\)*' contains=gpgID
93syn match   gpgArgError contained display '\S\+\(\s\+\S\+\)*'
94
95hi def link gpgComment  Comment
96hi def link gpgTodo     Todo
97hi def link gpgID       Number
98hi def link gpgOption   Keyword
99hi def link gpgCommand  Error
100hi def link gpgArgError Error
101
102let b:current_syntax = "gpg"
103
104let &cpo = s:cpo_save
105unlet s:cpo_save
106