gpg.vim 5.5 KB

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