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