sd.vim (2223B)
1 " Language: streaming descriptor file 2 " Maintainer: Puria Nafisi Azizi (pna) <pna@netstudent.polito.it> 3 " License: This file can be redistribued and/or modified under the same terms 4 " as Vim itself. 5 " URL: http://netstudent.polito.it/vim_syntax/ 6 " Last Change: 2012 Feb 03 by Thilo Six 7 8 " quit when a syntax file was already loaded 9 if exists("b:current_syntax") 10 finish 11 endif 12 13 let s:cpo_save = &cpo 14 set cpo&vim 15 16 " Always ignore case 17 syn case ignore 18 19 " Comments 20 syn match sdComment /\s*[#;].*$/ 21 22 " IP Adresses 23 syn cluster sdIPCluster contains=sdIPError,sdIPSpecial 24 syn match sdIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained 25 syn match sdIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained 26 syn match sdIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@sdIPCluster 27 28 " Statements 29 syn keyword sdStatement AGGREGATE AUDIO_CHANNELS 30 syn keyword sdStatement BYTE_PER_PCKT BIT_PER_SAMPLE BITRATE 31 syn keyword sdStatement CLOCK_RATE CODING_TYPE CREATOR 32 syn match sdStatement /^\s*CODING_TYPE\>/ nextgroup=sdCoding skipwhite 33 syn match sdStatement /^\s*ENCODING_NAME\>/ nextgroup=sdEncoding skipwhite 34 syn keyword sdStatement FILE_NAME FRAME_LEN FRAME_RATE FORCE_FRAME_RATE 35 syn keyword sdStatement LICENSE 36 syn match sdStatement /^\s*MEDIA_SOURCE\>/ nextgroup=sdSource skipwhite 37 syn match sdStatement /^\s*MULTICAST\>/ nextgroup=sdIP skipwhite 38 syn keyword sdStatement PAYLOAD_TYPE PKT_LEN PRIORITY 39 syn keyword sdStatement SAMPLE_RATE 40 syn keyword sdStatement TITLE TWIN 41 syn keyword sdStatement VERIFY 42 43 " Known Options 44 syn keyword sdEncoding H26L MPV MP2T MP4V-ES 45 syn keyword sdCoding FRAME SAMPLE 46 syn keyword sdSource STORED LIVE 47 48 "Specials 49 syn keyword sdSpecial TRUE FALSE NULL 50 syn keyword sdDelimiter STREAM STREAM_END 51 syn match sdError /^search .\{257,}/ 52 53 54 hi def link sdIP Number 55 hi def link sdHostname Type 56 hi def link sdEncoding Identifier 57 hi def link sdCoding Identifier 58 hi def link sdSource Identifier 59 hi def link sdComment Comment 60 hi def link sdIPError Error 61 hi def link sdError Error 62 hi def link sdStatement Statement 63 hi def link sdIPSpecial Special 64 hi def link sdSpecial Special 65 hi def link sdDelimiter Delimiter 66 67 68 let b:current_syntax = "sd" 69 70 let &cpo = s:cpo_save 71 unlet s:cpo_save