codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Rebol3" Maintainer: Mike Williams <mrw@eandem.co.uk>4" Filenames: *.r5" Last Change: 27th June 20026" URL: http://www.eandem.co.uk/mrw/vim7"8 9" quit when a syntax file was already loaded10if exists("b:current_syntax")11 finish12endif13 14" Rebol is case insensitive15syn case ignore16 17" As per current users documentation18setlocal isk=@,48-57,?,!,.,',+,-,*,&,\|,=,_,~19 20" Yer TODO highlighter21syn keyword rebolTodo contained TODO22 23" Comments24syn match rebolComment ";.*$" contains=rebolTodo25 26" Words27syn match rebolWord "\a\k*"28syn match rebolWordPath "[^[:space:]]/[^[:space]]"ms=s+1,me=e-129 30" Booleans31syn keyword rebolBoolean true false on off yes no32 33" Values34" Integers35syn match rebolInteger "\<[+-]\=\d\+\('\d*\)*\>"36" Decimals37syn match rebolDecimal "[+-]\=\(\d\+\('\d*\)*\)\=[,.]\d*\(e[+-]\=\d\+\)\="38syn match rebolDecimal "[+-]\=\d\+\('\d*\)*\(e[+-]\=\d\+\)\="39" Time40syn match rebolTime "[+-]\=\(\d\+\('\d*\)*\:\)\{1,2}\d\+\('\d*\)*\([.,]\d\+\)\=\([AP]M\)\=\>"41syn match rebolTime "[+-]\=:\d\+\([.,]\d*\)\=\([AP]M\)\=\>"42" Dates43" DD-MMM-YY & YYYY format44syn match rebolDate "\d\{1,2}\([/-]\)\(Jan\|Feb\|Mar\|Apr\|May\|Jun\|Jul\|Aug\|Sep\|Oct\|Nov\|Dec\)\1\(\d\{2}\)\{1,2}\>"45" DD-month-YY & YYYY format46syn match rebolDate "\d\{1,2}\([/-]\)\(January\|February\|March\|April\|May\|June\|July\|August\|September\|October\|November\|December\)\1\(\d\{2}\)\{1,2}\>"47" DD-MM-YY & YY format48syn match rebolDate "\d\{1,2}\([/-]\)\d\{1,2}\1\(\d\{2}\)\{1,2}\>"49" YYYY-MM-YY format50syn match rebolDate "\d\{4}-\d\{1,2}-\d\{1,2}\>"51" DD.MM.YYYY format52syn match rebolDate "\d\{1,2}\.\d\{1,2}\.\d\{4}\>"53" Money54syn match rebolMoney "\a*\$\d\+\('\d*\)*\([,.]\d\+\)\="55" Strings56syn region rebolString oneline start=+"+ skip=+^"+ end=+"+ contains=rebolSpecialCharacter57syn region rebolString start=+[^#]{+ end=+}+ skip=+{[^}]*}+ contains=rebolSpecialCharacter58" Binary59syn region rebolBinary start=+\d*#{+ end=+}+ contains=rebolComment60" Email61syn match rebolEmail "\<\k\+@\(\k\+\.\)*\k\+\>"62" File63syn match rebolFile "%\(\k\+/\)*\k\+[/]\=" contains=rebolSpecialCharacter64syn region rebolFile oneline start=+%"+ end=+"+ contains=rebolSpecialCharacter65" URLs66syn match rebolURL "http://\k\+\(\.\k\+\)*\(:\d\+\)\=\(/\(\k\+/\)*\(\k\+\)\=\)*"67syn match rebolURL "file://\k\+\(\.\k\+\)*/\(\k\+/\)*\k\+"68syn match rebolURL "ftp://\(\k\+:\k\+@\)\=\k\+\(\.\k\+\)*\(:\d\+\)\=/\(\k\+/\)*\k\+"69syn match rebolURL "mailto:\k\+\(\.\k\+\)*@\k\+\(\.\k\+\)*"70" Issues71syn match rebolIssue "#\(\d\+-\)*\d\+"72" Tuples73syn match rebolTuple "\(\d\+\.\)\{2,}"74 75" Characters76syn match rebolSpecialCharacter contained "\^[^[:space:][]"77syn match rebolSpecialCharacter contained "%\d\+"78 79 80" Operators81" Math operators82syn match rebolMathOperator "\(\*\{1,2}\|+\|-\|/\{1,2}\)"83syn keyword rebolMathFunction abs absolute add arccosine arcsine arctangent cosine84syn keyword rebolMathFunction divide exp log-10 log-2 log-e max maximum min85syn keyword rebolMathFunction minimum multiply negate power random remainder sine86syn keyword rebolMathFunction square-root subtract tangent87" Binary operators88syn keyword rebolBinaryOperator complement and or xor ~89" Logic operators90syn match rebolLogicOperator "[<>=]=\="91syn match rebolLogicOperator "<>"92syn keyword rebolLogicOperator not93syn keyword rebolLogicFunction all any94syn keyword rebolLogicFunction head? tail?95syn keyword rebolLogicFunction negative? positive? zero? even? odd?96syn keyword rebolLogicFunction binary? block? char? date? decimal? email? empty?97syn keyword rebolLogicFunction file? found? function? integer? issue? logic? money?98syn keyword rebolLogicFunction native? none? object? paren? path? port? series?99syn keyword rebolLogicFunction string? time? tuple? url? word?100syn keyword rebolLogicFunction exists? input? same? value?101 102" Datatypes103syn keyword rebolType binary! block! char! date! decimal! email! file!104syn keyword rebolType function! integer! issue! logic! money! native!105syn keyword rebolType none! object! paren! path! port! string! time!106syn keyword rebolType tuple! url! word!107syn keyword rebolTypeFunction type?108 109" Control statements110syn keyword rebolStatement break catch exit halt reduce return shield111syn keyword rebolConditional if else112syn keyword rebolRepeat for forall foreach forskip loop repeat while until do113 114" Series statements115syn keyword rebolStatement change clear copy fifth find first format fourth free116syn keyword rebolStatement func function head insert last match next parse past117syn keyword rebolStatement pick remove second select skip sort tail third trim length?118 119" Context120syn keyword rebolStatement alias bind use121 122" Object123syn keyword rebolStatement import make make-object rebol info?124 125" I/O statements126syn keyword rebolStatement delete echo form format import input load mold prin127syn keyword rebolStatement print probe read save secure send write128syn keyword rebolOperator size? modified?129 130" Debug statement131syn keyword rebolStatement help probe trace132 133" Misc statements134syn keyword rebolStatement func function free135 136" Constants137syn keyword rebolConstant none138 139 140" Define the default highlighting.141" Only when an item doesn't have highlighting yet142 143hi def link rebolTodo Todo144 145hi def link rebolStatement Statement146hi def link rebolLabel Label147hi def link rebolConditional Conditional148hi def link rebolRepeat Repeat149 150hi def link rebolOperator Operator151hi def link rebolLogicOperator rebolOperator152hi def link rebolLogicFunction rebolLogicOperator153hi def link rebolMathOperator rebolOperator154hi def link rebolMathFunction rebolMathOperator155hi def link rebolBinaryOperator rebolOperator156hi def link rebolBinaryFunction rebolBinaryOperator157 158hi def link rebolType Type159hi def link rebolTypeFunction rebolOperator160 161hi def link rebolWord Identifier162hi def link rebolWordPath rebolWord163hi def link rebolFunction Function164 165hi def link rebolCharacter Character166hi def link rebolSpecialCharacter SpecialChar167hi def link rebolString String168 169hi def link rebolNumber Number170hi def link rebolInteger rebolNumber171hi def link rebolDecimal rebolNumber172hi def link rebolTime rebolNumber173hi def link rebolDate rebolNumber174hi def link rebolMoney rebolNumber175hi def link rebolBinary rebolNumber176hi def link rebolEmail rebolString177hi def link rebolFile rebolString178hi def link rebolURL rebolString179hi def link rebolIssue rebolNumber180hi def link rebolTuple rebolNumber181hi def link rebolFloat Float182hi def link rebolBoolean Boolean183 184hi def link rebolConstant Constant185 186hi def link rebolComment Comment187 188hi def link rebolError Error189 190 191if exists("my_rebol_file")192 if file_readable(expand(my_rebol_file))193 execute "source " . my_rebol_file194 endif195endif196 197let b:current_syntax = "rebol"198 199" vim: ts=8200 