Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1 | " Vim syntax file |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 2 | " Language: gpg(1) configuration file |
Christian Brabandt | f9ca139 | 2024-02-19 20:37:11 +0100 | [diff] [blame] | 3 | " Maintainer: This runtime file is looking for a maintainer. |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 4 | " Previous Maintainer: Nikolai Weibull <now@bitwi.se> |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 5 | " Latest Revision: 2024-02-11 |
| 6 | " Updated: |
| 7 | " 2023-01-23 @ObserverOfTime: added a couple of keywords |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 8 | " 2023-03-21 Todd Zullinger <tmz@pobox.com>: sync with gnupg-2.4.0 |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 9 | " 2024-02-10 Daniel Kahn Gillmor <dkg@fifthhorseman.net>: |
| 10 | " mark use-embedded-filename as warning for security reasons |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 11 | |
Bram Moolenaar | 42eeac3 | 2005-06-29 22:40:58 +0000 | [diff] [blame] | 12 | if exists("b:current_syntax") |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 13 | finish |
| 14 | endif |
| 15 | |
Bram Moolenaar | 42eeac3 | 2005-06-29 22:40:58 +0000 | [diff] [blame] | 16 | let s:cpo_save = &cpo |
| 17 | set cpo&vim |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 18 | |
Bram Moolenaar | 3577c6f | 2008-06-24 21:16:56 +0000 | [diff] [blame] | 19 | setlocal iskeyword+=- |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 20 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 21 | syn keyword gpgTodo contained FIXME TODO XXX NOTE |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 22 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 23 | syn region gpgComment contained display oneline start='#' end='$' |
| 24 | \ contains=gpgTodo,gpgID,@Spell |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 25 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 26 | syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 27 | |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 28 | syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgOptionDeprecated,gpgCommand |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 29 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 30 | syn keyword gpgCommand contained skipwhite nextgroup=gpgArg |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 48 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 49 | syn keyword gpgCommand contained skipwhite nextgroup=gpgArgError |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 61 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 62 | syn keyword gpgOption contained skipwhite nextgroup=gpgArg |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 105 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 106 | syn keyword gpgOption contained skipwhite nextgroup=gpgArgError |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 130 | \ list-only lock-multiple lock-never lock-once |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 139 | \ no-default-keyring no-default-recipient |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 154 | \ no-utf8-strings no-verbose |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 164 | \ unwrap use-agent use-keyboxd |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 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 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 172 | |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 173 | " depcrated for security reasons |
| 174 | syn keyword gpgOptionDeprecated contained skipwhite nextgroup=gpgArgError |
| 175 | \ use-embedded-filename no-use-embedded-filename |
| 176 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 177 | syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID |
Bram Moolenaar | 42eeac3 | 2005-06-29 22:40:58 +0000 | [diff] [blame] | 178 | syn match gpgArgError contained display '\S\+\(\s\+\S\+\)*' |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 179 | |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 180 | hi def link gpgComment Comment |
| 181 | hi def link gpgTodo Todo |
| 182 | hi def link gpgID Number |
| 183 | hi def link gpgOption Keyword |
Christian Brabandt | 6d91227 | 2024-02-11 18:19:45 +0100 | [diff] [blame] | 184 | hi def link gpgOptionDeprecated WarningMsg |
Bram Moolenaar | be4e016 | 2023-02-02 13:59:48 +0000 | [diff] [blame] | 185 | hi def link gpgCommand Error |
Bram Moolenaar | 71badf9 | 2023-04-22 22:40:14 +0100 | [diff] [blame] | 186 | hi def link gpgArgError Error |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 187 | |
| 188 | let b:current_syntax = "gpg" |
| 189 | |
Bram Moolenaar | 42eeac3 | 2005-06-29 22:40:58 +0000 | [diff] [blame] | 190 | let &cpo = s:cpo_save |
| 191 | unlet s:cpo_save |