"Fossies" - the Fresh Open Source Software Archive

Member "vim-8.2.1354/runtime/syntax/procmail.vim" (2 Aug 2020, 2019 Bytes) of package /linux/misc/vim-8.2.1354.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) vimscript source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 " Vim syntax file
    2 " Language: Procmail definition file
    3 " Maintainer:   Melchior FRANZ <mfranz@aon.at>
    4 " Last Change:  2003 Aug 14
    5 " Author:   Sonia Heimann
    6 
    7 " quit when a syntax file was already loaded
    8 if exists("b:current_syntax")
    9   finish
   10 endif
   11 
   12 syn match   procmailComment      "#.*$" contains=procmailTodo
   13 syn keyword   procmailTodo      contained Todo TBD
   14 
   15 syn region  procmailString       start=+"+  skip=+\\"+  end=+"+
   16 syn region  procmailString       start=+'+  skip=+\\'+  end=+'+
   17 
   18 syn region procmailVarDeclRegion start="^\s*[a-zA-Z0-9_]\+\s*="hs=e-1 skip=+\\$+ end=+$+ contains=procmailVar,procmailVarDecl,procmailString
   19 syn match procmailVarDecl contained "^\s*[a-zA-Z0-9_]\+"
   20 syn match procmailVar "$[a-zA-Z0-9_]\+"
   21 
   22 syn match procmailCondition contained "^\s*\*.*"
   23 
   24 syn match procmailActionFolder contained "^\s*[-_a-zA-Z0-9/]\+"
   25 syn match procmailActionVariable contained "^\s*$[a-zA-Z_]\+"
   26 syn region procmailActionForward start=+^\s*!+ skip=+\\$+ end=+$+
   27 syn region procmailActionPipe start=+^\s*|+ skip=+\\$+ end=+$+
   28 syn region procmailActionNested start=+^\s*{+ end=+^\s*}+ contains=procmailRecipe,procmailComment,procmailVarDeclRegion
   29 
   30 syn region procmailRecipe start=+^\s*:.*$+ end=+^\s*\($\|}\)+me=e-1 contains=procmailComment,procmailCondition,procmailActionFolder,procmailActionVariable,procmailActionForward,procmailActionPipe,procmailActionNested,procmailVarDeclRegion
   31 
   32 " Define the default highlighting.
   33 " Only when an item doesn't have highlighting yet
   34 
   35 hi def link procmailComment Comment
   36 hi def link procmailTodo    Todo
   37 
   38 hi def link procmailRecipe   Statement
   39 "hi def link procmailCondition   Statement
   40 
   41 hi def link procmailActionFolder    procmailAction
   42 hi def link procmailActionVariable procmailAction
   43 hi def link procmailActionForward   procmailAction
   44 hi def link procmailActionPipe  procmailAction
   45 hi def link procmailAction      Function
   46 hi def link procmailVar     Identifier
   47 hi def link procmailVarDecl Identifier
   48 
   49 hi def link procmailString String
   50 
   51 
   52 let b:current_syntax = "procmail"
   53 
   54 " vim: ts=8