robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqvim-patch:f9ca139e3aa1 (#27554)9bb046d1be

master
8.3 KiB191 linesraw
1" Vim syntax file
2" Language:		gpg(1) configuration file
3" Maintainer: This runtime file is looking for a maintainer.
4" Previous Maintainer:	Nikolai Weibull <now@bitwi.se>
5" Latest Revision:	2024-02-11
6" Updated:		
7"     2023-01-23 @ObserverOfTime: added a couple of keywords
8"			2023-03-21 Todd Zullinger <tmz@pobox.com>: sync with gnupg-2.4.0
9"			2024-02-10 Daniel Kahn Gillmor <dkg@fifthhorseman.net>:
10"			           mark use-embedded-filename as warning for security reasons
11
12if exists("b:current_syntax")
13  finish
14endif
15
16let s:cpo_save = &cpo
17set cpo&vim
18
19setlocal iskeyword+=-
20
21syn keyword gpgTodo	contained FIXME TODO XXX NOTE
22
23syn region  gpgComment	contained display oneline start='#' end='$'
24			\ contains=gpgTodo,gpgID,@Spell
25
26syn match   gpgID	contained display '\<\(0x\)\=\x\{8,}\>'
27
28syn match   gpgBegin	display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgOptionDeprecated,gpgCommand
29
30syn keyword gpgCommand	contained skipwhite nextgroup=gpgArg
31			\ change-passphrase check-sig check-signatures
32			\ check-sigs delete-keys delete-secret-and-public-keys
33			\ delete-secret-keys desig-revoke export
34			\ export-secret-keys export-secret-ssh-key
35			\ export-secret-subkeys export-ssh-key list-key
36			\ list-keys list-packets list-public-keys
37			\ list-secret-keys list-sig list-signatures list-sigs
38			\ passwd send-keys fetch-keys
39			\ generate-designated-revocation generate-revocation
40			\ gen-prime gen-random gen-revoke locate-external-keys
41			\ locate-keys lsign-key options print-md quick-add-key
42			\ quick-addkey quick-add-uid quick-adduid
43			\ quick-generate-key quick-gen-key quick-lsign-key
44			\ quick-revoke-sig quick-revoke-uid quick-revuid
45			\ quick-set-expire quick-set-primary-uid quick-sign-key
46			\ quick-update-pref receive-keys recv-keys refresh-keys
47			\ search-keys show-key show-keys sign-key tofu-policy
48
49syn keyword gpgCommand	contained skipwhite nextgroup=gpgArgError
50			\ card-edit card-status change-pin check-trustdb
51			\ clear-sign clearsign dearmor dearmour decrypt
52			\ decrypt-files detach-sign encrypt encrypt-files
53			\ edit-card edit-key enarmor enarmour export-ownertrust
54			\ fast-import import import-ownertrust key-edit
55			\ fingerprint fix-trustdb full-generate-key
56			\ full-gen-key generate-key gen-key gpgconf-list
57			\ gpgconf-test list-config list-gcrypt-config
58			\ list-trustdb no-options print-mds
59			\ rebuild-keydb-caches server sign store symmetric
60			\ update-trustdb verify verify-files
61
62syn keyword gpgOption	contained skipwhite nextgroup=gpgArg
63			\ aead-algo agent-program attribute-fd attribute-file
64			\ auto-key-locate bzip2-compress-level cert-digest-algo
65			\ cert-notation cert-policy-url charset chuid
66			\ chunk-size cipher-algo command-fd command-file
67			\ comment compatibility-flags completes-needed
68			\ compliance compress-algo compression-algo
69			\ compress-level ctapi-driver debug
70			\ debug-allow-large-chunks debug-level
71			\ debug-set-iobuf-size default-cert-check-level
72			\ default-cert-expire default-cert-level default-key
73			\ default-keyserver-url default-new-key-algo
74			\ default-preference-list default-recipient
75			\ default-sig-expire digest-algo dirmngr-program
76			\ disable-cipher-algo disable-pubkey-algo display
77			\ display-charset encrypt-to exec-path export-filter
78			\ export-options faked-system-time force-ownertrust
79			\ gpg-agent-info group hidden-encrypt-to
80			\ hidden-recipient hidden-recipient-file homedir
81			\ import-filter import-options input-size-hint
82			\ keyboxd-program keyid-format key-origin keyring
83			\ keyserver keyserver-options known-notation lc-ctype
84			\ lc-messages limit-card-insert-tries list-filter
85			\ list-options local-user log-file logger-fd
86			\ logger-file marginals-needed max-cert-depth
87			\ max-output min-cert-level min-rsa-length output
88			\ override-session-key override-session-key-fd
89			\ passphrase passphrase-fd passphrase-file
90			\ passphrase-repeat pcsc-driver
91			\ personal-aead-preferences personal-cipher-preferences
92			\ personal-cipher-prefs personal-compress-preferences
93			\ personal-compress-prefs personal-digest-preferences
94			\ photo-viewer pinentry-mode primary-keyring
95			\ reader-port recipient recipient-file remote-user
96			\ request-origin s2k-cipher-algo s2k-count
97			\ s2k-digest-algo s2k-mode secret-keyring sender
98			\ set-filename set-filesize set-notation set-policy-url
99			\ sig-keyserver-url sig-notation sign-with
100			\ sig-policy-url status-fd status-file temp-directory
101			\ tofu-db-format tofu-default-policy trustdb-name
102			\ trusted-key trust-model try-secret-key ttyname
103			\ ttytype ungroup user verify-options weak-digest
104			\ xauthority
105
106syn keyword gpgOption	contained skipwhite nextgroup=gpgArgError
107			\ allow-freeform-uid allow-multiple-messages
108			\ allow-multisig-verification allow-non-selfsigned-uid
109			\ allow-old-cipher-algos allow-secret-key-import
110			\ allow-weak-digest-algos allow-weak-key-signatures
111			\ always-trust armor armour ask-cert-expire
112			\ ask-cert-level ask-sig-expire auto-check-trustdb
113			\ auto-key-import auto-key-retrieve batch
114			\ bzip2-decompress-lowmem compress-keys compress-sigs
115			\ debug-all debug-iolbf debug-quick-random
116			\ default-comment default-recipient-self disable-ccid
117			\ disable-dirmngr disable-dsa2 disable-large-rsa
118			\ disable-mdc disable-signer-uid dry-run dump-options
119			\ dump-option-table emit-version enable-dsa2
120			\ enable-large-rsa enable-progress-filter
121			\ enable-special-filenames encrypt-to-default-key
122			\ escape-from-lines exit-on-status-write-error expert
123			\ fast-list-mode file-is-digest fixed-list-mode
124			\ forbid-gen-key force-aead force-mdc force-ocb
125			\ force-sign-key force-v3-sigs force-v4-certs
126			\ for-your-eyes-only full-timestrings gnupg help
127			\ honor-http-proxy ignore-crc-error ignore-mdc-error
128			\ ignore-time-conflict ignore-valid-from
129			\ include-key-block interactive legacy-list-mode
130			\ list-only lock-multiple lock-never lock-once
131			\ mangle-dos-filenames merge-only mimemode multifile no
132			\ no-allow-freeform-uid no-allow-multiple-messages
133			\ no-allow-non-selfsigned-uid no-armor no-armour
134			\ no-ask-cert-expire no-ask-cert-level
135			\ no-ask-sig-expire no-auto-check-trustdb
136			\ no-auto-key-import no-auto-key-locate
137			\ no-auto-key-retrieve no-autostart
138			\ no-auto-trust-new-key no-batch no-comments
139			\ no-default-keyring no-default-recipient
140			\ no-disable-mdc no-emit-version no-encrypt-to
141			\ no-escape-from-lines no-expensive-trust-checks
142			\ no-expert no-force-mdc no-force-v3-sigs
143			\ no-force-v4-certs no-for-your-eyes-only no-greeting
144			\ no-groups no-include-key-block no-keyring no-literal
145			\ no-mangle-dos-filenames no-mdc-warning
146			\ no-permission-warning no-pgp2 no-pgp6 no-pgp7 no-pgp8
147			\ no-random-seed-file no-require-backsigs
148			\ no-require-cross-certification no-require-secmem
149			\ no-rfc2440-text no-secmem-warning no-show-notation
150			\ no-show-photos no-show-policy-url no-sig-cache
151			\ no-sk-comments no-skip-hidden-recipients
152			\ no-symkey-cache not-dash-escaped no-textmode
153			\ no-throw-keyids no-tty no-use-agent
154			\ no-utf8-strings no-verbose
155			\ no-version only-sign-text-ids openpgp
156			\ override-compliance-check pgp6 pgp7 pgp8
157			\ preserve-permissions print-dane-records quiet
158			\ require-backsigs require-compliance
159			\ require-cross-certification require-secmem rfc2440
160			\ rfc2440-text rfc4880 rfc4880bis show-keyring
161			\ show-notation show-photos show-policy-url
162			\ show-session-key sk-comments skip-hidden-recipients
163			\ skip-verify textmode throw-keyids try-all-secrets
164			\ unwrap use-agent use-keyboxd
165			\ use-only-openpgp-card utf8-strings verbose version
166			\ warranty with-colons with-fingerprint
167			\ with-icao-spelling with-key-data with-keygrip
168			\ with-key-origin with-key-screening with-secret
169			\ with-sig-check with-sig-list with-subkey-fingerprint
170			\ with-subkey-fingerprints with-tofu-info with-wkd-hash
171			\ yes
172
173" depcrated for security reasons
174syn keyword gpgOptionDeprecated	contained skipwhite nextgroup=gpgArgError
175      \ use-embedded-filename no-use-embedded-filename
176
177syn match   gpgArg	contained display '\S\+\(\s\+\S\+\)*' contains=gpgID
178syn match   gpgArgError contained display '\S\+\(\s\+\S\+\)*'
179
180hi def link gpgComment	Comment
181hi def link gpgTodo	Todo
182hi def link gpgID	Number
183hi def link gpgOption	Keyword
184hi def link gpgOptionDeprecated	WarningMsg
185hi def link gpgCommand	Error
186hi def link gpgArgError	Error
187
188let b:current_syntax = "gpg"
189
190let &cpo = s:cpo_save
191unlet s:cpo_save