blob: b7307b9d9ca5af7b8d189e82915c94c72d1e6d1c [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar42eeac32005-06-29 22:40:58 +00002" Language: gpg(1) configuration file
Bram Moolenaar57657d82006-04-21 22:12:41 +00003" Maintainer: Nikolai Weibull <now@bitwi.se>
Bram Moolenaar2bb8df22007-05-10 17:26:28 +00004" Latest Revision: 2007-05-06
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
Bram Moolenaar42eeac32005-06-29 22:40:58 +00006if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +00007 finish
8endif
9
Bram Moolenaar42eeac32005-06-29 22:40:58 +000010let s:cpo_save = &cpo
11set cpo&vim
Bram Moolenaar071d4272004-06-13 20:20:40 +000012
Bram Moolenaar42eeac32005-06-29 22:40:58 +000013setlocal iskeyword=@,48-57,-
Bram Moolenaar071d4272004-06-13 20:20:40 +000014
Bram Moolenaar42eeac32005-06-29 22:40:58 +000015syn keyword gpgTodo contained FIXME TODO XXX NOTE
Bram Moolenaar071d4272004-06-13 20:20:40 +000016
Bram Moolenaar42eeac32005-06-29 22:40:58 +000017syn region gpgComment contained display oneline start='#' end='$'
18 \ contains=gpgTodo,gpgID,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000019
Bram Moolenaar42eeac32005-06-29 22:40:58 +000020syn match gpgID contained display '\<\(0x\)\=\x\{8,}\>'
Bram Moolenaar071d4272004-06-13 20:20:40 +000021
Bram Moolenaar42eeac32005-06-29 22:40:58 +000022syn match gpgBegin display '^' skipwhite nextgroup=gpgComment,gpgOption,gpgCommand
Bram Moolenaar071d4272004-06-13 20:20:40 +000023
Bram Moolenaar42eeac32005-06-29 22:40:58 +000024syn 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000040
Bram Moolenaar42eeac32005-06-29 22:40:58 +000041syn 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
Bram Moolenaar2bb8df22007-05-10 17:26:28 +000057 \ trusted-key verify-options
Bram Moolenaar42eeac32005-06-29 22:40:58 +000058syn 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
Bram Moolenaar071d4272004-06-13 20:20:40 +000091
Bram Moolenaar42eeac32005-06-29 22:40:58 +000092syn match gpgArg contained display '\S\+\(\s\+\S\+\)*' contains=gpgID
93syn match gpgArgError contained display '\S\+\(\s\+\S\+\)*'
Bram Moolenaar071d4272004-06-13 20:20:40 +000094
Bram Moolenaar42eeac32005-06-29 22:40:58 +000095hi 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
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101
102let b:current_syntax = "gpg"
103
Bram Moolenaar42eeac32005-06-29 22:40:58 +0000104let &cpo = s:cpo_save
105unlet s:cpo_save