"Fossies" - the Fresh Open Source Software Archive

Member "vim-8.2.1354/runtime/syntax/sm.vim" (2 Aug 2020, 2851 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: sendmail
    3 " Maintainer:   Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>
    4 " Last Change:  Oct 25, 2016
    5 " Version:  9
    6 " URL:  http://www.drchip.org/astronaut/vim/index.html#SYNTAX_SM
    7 if exists("b:current_syntax")
    8   finish
    9 endif
   10 
   11 " Comments
   12 syn match smComment "^#.*$" contains=@Spell
   13 
   14 " Definitions, Classes, Files, Options, Precedence, Trusted Users, Mailers
   15 syn match smDefine  "^[CDF]."
   16 syn match smDefine  "^O[AaBcdDeFfgHiLmNoQqrSsTtuvxXyYzZ]"
   17 syn match smDefine  "^O\s"he=e-1
   18 syn match smDefine  "^M[a-zA-Z0-9]\+,"he=e-1
   19 syn match smDefine  "^T"    nextgroup=smTrusted
   20 syn match smDefine  "^P"    nextgroup=smMesg
   21 syn match smTrusted "\S\+$"     contained
   22 syn match smMesg        "\S*="he=e-1    contained nextgroup=smPrecedence
   23 syn match smPrecedence  "-\=[0-9]\+"        contained
   24 
   25 " Header Format  H?list-of-mailer-flags?name: format
   26 syn match smHeaderSep contained "[?:]"
   27 syn match smHeader  "^H\(?[a-zA-Z]\+?\)\=[-a-zA-Z_]\+:" contains=smHeaderSep
   28 
   29 " Variables
   30 syn match smVar     "\$[a-z\.\|]"
   31 
   32 " Rulesets
   33 syn match smRuleset "^S\d*"
   34 
   35 " Rewriting Rules
   36 syn match smRewrite "^R"            skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsUser
   37 
   38 syn match smRewriteLhsUser  contained "[^\t$]\+"        skipwhite nextgroup=smRewriteLhsToken,smRewriteLhsSep
   39 syn match smRewriteLhsToken contained "\(\$[-*+]\|\$[-=][A-Za-z]\|\$Y\)\+"  skipwhite nextgroup=smRewriteLhsUser,smRewriteLhsSep
   40 
   41 syn match smRewriteLhsSep   contained "\t\+"            skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsUser
   42 
   43 syn match smRewriteRhsUser  contained "[^\t$]\+"        skipwhite nextgroup=smRewriteRhsToken,smRewriteRhsSep
   44 syn match smRewriteRhsToken contained "\(\$\d\|\$>\d\|\$#\|\$@\|\$:[-_a-zA-Z]\+\|\$[[\]]\|\$@\|\$:\|\$[A-Za-z]\)\+" skipwhite nextgroup=smRewriteRhsUser,smRewriteRhsSep
   45 
   46 syn match smRewriteRhsSep   contained "\t\+"            skipwhite nextgroup=smRewriteComment,smRewriteRhsSep
   47 syn match smRewriteRhsSep   contained "$"
   48 
   49 syn match smRewriteComment  contained "[^\t$]*$"
   50 
   51 " Clauses
   52 syn match smClauseError     "\$\."
   53 syn match smElse        contained   "\$|"
   54 syn match smClauseCont  contained   "^\t"
   55 syn region smClause matchgroup=Delimiter start="\$?." matchgroup=Delimiter end="\$\." contains=smElse,smClause,smVar,smClauseCont
   56 
   57 " Define the default highlighting.
   58 " Only when an item doesn't have highlighting yet
   59 
   60 hi def link smClause    Special
   61 hi def link smClauseError   Error
   62 hi def link smComment   Comment
   63 hi def link smDefine    Statement
   64 hi def link smElse  Delimiter
   65 hi def link smHeader    Statement
   66 hi def link smHeaderSep String
   67 hi def link smMesg  Special
   68 hi def link smPrecedence    Number
   69 hi def link smRewrite   Statement
   70 hi def link smRewriteComment    Comment
   71 hi def link smRewriteLhsToken   String
   72 hi def link smRewriteLhsUser    Statement
   73 hi def link smRewriteRhsToken   String
   74 hi def link smRuleset   Preproc
   75 hi def link smTrusted   Special
   76 hi def link smVar       String
   77 
   78 let b:current_syntax = "sm"
   79 
   80 " vim: ts=18