summaryrefslogtreecommitdiff
path: root/runtime/syntax/sieve.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-12-09 21:34:53 +0000
committerBram Moolenaar <Bram@vim.org>2004-12-09 21:34:53 +0000
commit293ee4d421cd55f4a3c014c1c26edf02f718cc83 (patch)
treeae4856e718b752ea0c6c807912bfbb51967fae80 /runtime/syntax/sieve.vim
parent741b07e0092eb6d7b81c9cbe149196c6cf9d5bbe (diff)
downloadvim-git-293ee4d421cd55f4a3c014c1c26edf02f718cc83.tar.gz
updated for version 7.0021v7.0021
Diffstat (limited to 'runtime/syntax/sieve.vim')
-rw-r--r--runtime/syntax/sieve.vim70
1 files changed, 70 insertions, 0 deletions
diff --git a/runtime/syntax/sieve.vim b/runtime/syntax/sieve.vim
new file mode 100644
index 000000000..2923f446b
--- /dev/null
+++ b/runtime/syntax/sieve.vim
@@ -0,0 +1,70 @@
+" Vim syntax file
+" Maintainer: Nikolai Weibull <source@pcppopper.org>
+" URL: http://www.pcppopper.org/
+" Latest Revision: 2004-11-11
+" arch-tag: 356fad6d-ff6b-453c-bd25-7fc63c4758bc
+
+if version < 600
+ syntax clear
+elseif exists("b:current_syntax")
+ finish
+endif
+
+" Todo
+syn keyword sieveTodo contained TODO FIXME XXX NOTE
+
+" Comments
+syn region sieveComment matchgroup=sieveComment start='/\*' end='\*/' contains=sieveTodo
+syn region sieveComment matchgroup=sieveComment start='#' end='$' contains=sieveTodo
+
+syn case ignore
+
+" Tags
+syn match sieveTag ':\h\w*'
+
+" Numbers
+syn match sieveNumber '\d\+[KMG]\='
+
+" Specials
+syn match sieveSpecial '\\["\\]'
+
+" Strings
+syn region sieveString matchgroup=sieveString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=sieveSpecial
+syn region sieveString matchgroup=sieveString start='text:' end='\n.\n'
+
+" Keywords
+syn keyword sieveConditional if elsif else
+syn keyword sieveTest address allof anyof envelope exists false header not size true
+syn keyword sievePreProc require stop
+syn keyword sieveAction reject fileinto redirect keep discard
+syn match sieveKeyword '\<\h\w*\>'
+
+" Define the default highlighting.
+" For version 5.7 and earlier: only when not done already
+" For version 5.8 and later: only when an item doesn't have highlighting yet
+if version >= 508 || !exists("did_sieve_syn_inits")
+ if version < 508
+ let did_sieve_syn_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+
+ HiLink sieveTodo Todo
+ HiLink sieveComment Comment
+ HiLink sieveTag Type
+ HiLink sieveNumber Number
+ HiLink sieveSpecial Special
+ HiLink sieveString String
+ HiLink sieveConditional Conditional
+ HiLink sieveTest Keyword
+ HiLink sievePreProc PreProc
+ HiLink sieveAction Keyword
+ HiLink sieveKeyword Keyword
+
+ delcommand HiLink
+endif
+
+let b:current_syntax = "sieve"
+
+" vim: set sts=2 sw=2: