1" 2" Vim syntax file 3" Language : Scilab 4" Maintainer : Benoit Hamelin 5" File type : *.sci (see :help filetype) 6" History 7" 28jan2002 benoith 0.1 Creation. Adapted from matlab.vim. 8" 04feb2002 benoith 0.5 Fixed bugs with constant highlighting. 9" 10 11 12" quit when a syntax file was already loaded 13if exists("b:current_syntax") 14 finish 15endif 16 17 18" Reserved words. 19syn keyword scilabStatement abort clear clearglobal end exit global mode predef quit resume 20syn keyword scilabStatement return 21syn keyword scilabFunction function endfunction funptr 22syn keyword scilabPredicate null iserror isglobal 23syn keyword scilabKeyword typename 24syn keyword scilabDebug debug pause what where whereami whereis who whos 25syn keyword scilabRepeat for while break 26syn keyword scilabConditional if then else elseif 27syn keyword scilabMultiplex select case 28 29" Reserved constants. 30syn match scilabConstant "\(%\)[0-9A-Za-z?!#$]\+" 31syn match scilabBoolean "\(%\)[FTft]\>" 32 33" Delimiters and operators. 34syn match scilabDelimiter "[][;,()]" 35syn match scilabComparison "[=~]=" 36syn match scilabComparison "[<>]=\=" 37syn match scilabComparison "<>" 38syn match scilabLogical "[&|~]" 39syn match scilabAssignment "=" 40syn match scilabArithmetic "[+-]" 41syn match scilabArithmetic "\.\=[*/\\]\.\=" 42syn match scilabArithmetic "\.\=^" 43syn match scilabRange ":" 44syn match scilabMlistAccess "\." 45 46syn match scilabLineContinuation "\.\{2,}" 47 48syn match scilabTransposition "[])a-zA-Z0-9?!_#$.]'"lc=1 49 50" Comments and tools. 51syn keyword scilabTodo TODO todo FIXME fixme TBD tbd contained 52syn match scilabComment "//.*$" contains=scilabTodo 53 54" Constants. 55syn match scilabNumber "[0-9]\+\(\.[0-9]*\)\=\([DEde][+-]\=[0-9]\+\)\=" 56syn match scilabNumber "\.[0-9]\+\([DEde][+-]\=[0-9]\+\)\=" 57syn region scilabString start=+'+ skip=+''+ end=+'+ oneline 58syn region scilabString start=+"+ end=+"+ oneline 59 60" Identifiers. 61syn match scilabIdentifier "\<[A-Za-z?!_#$][A-Za-z0-9?!_#$]*\>" 62syn match scilabOverload "%[A-Za-z0-9?!_#$]\+_[A-Za-z0-9?!_#$]\+" 63 64 65" Define the default highlighting. 66" Only when an item doesn't have highlighting yet 67 68hi def link scilabStatement Statement 69hi def link scilabFunction Keyword 70hi def link scilabPredicate Keyword 71hi def link scilabKeyword Keyword 72hi def link scilabDebug Debug 73hi def link scilabRepeat Repeat 74hi def link scilabConditional Conditional 75hi def link scilabMultiplex Conditional 76 77hi def link scilabConstant Constant 78hi def link scilabBoolean Boolean 79 80hi def link scilabDelimiter Delimiter 81hi def link scilabMlistAccess Delimiter 82hi def link scilabComparison Operator 83hi def link scilabLogical Operator 84hi def link scilabAssignment Operator 85hi def link scilabArithmetic Operator 86hi def link scilabRange Operator 87hi def link scilabLineContinuation Underlined 88hi def link scilabTransposition Operator 89 90hi def link scilabTodo Todo 91hi def link scilabComment Comment 92 93hi def link scilabNumber Number 94hi def link scilabString String 95 96hi def link scilabIdentifier Identifier 97hi def link scilabOverload Special 98 99 100let b:current_syntax = "scilab" 101 102"EOF vim: ts=4 noet tw=100 sw=4 sts=0 103