1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
|
" There has to be a file called filetype.vim in your ~/.vim directory
" with the following content:
" faust filetype file
" if exists("did_load_filetypes")
" finish
" endif
" augroup filetypedetect
" au! BufRead,BufNewFile *.fst setfiletype faust
" au! BufRead,BufNewFile *.dsp setfiletype faust
" augroup END
"
"
" Faust syntax file
" Language: faust
" Maintainer: bjoern lindig <kebjoern@yahoo.de>
" Version: 0.1
" Last change: 2009-05-12
" remove any old syntax stuff hanging around
syn clear
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" faust primitives
" the list is taken from the faust.xml file writen for the kate-editor and may
" not be complete
syn keyword fstPrims mem prefix int float rdtable rwtable select2 select3 ffunction fconstant fvariable button checkbox vslider hslider nentry vgroup hgroup tgroup vbargraph hbargraph attach acos asin atan atan2 cos sin tan exp log log10 pow sqrt abs min max fmod remainder floor ceil rint
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" faust operators
syn keyword fstOps process with case seq par sum prod import component library environment declare
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" faust comments
syn match fstComment "//.*$"
syn region fstComment start="/\*" end="\*/" contains=fstOperator keepend extend
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" faust operators
syn match fstOperator "_"
syn match fstOperator "!"
syn match fstOperator "+"
syn match fstOperator "-"
syn match fstOperator "*"
syn match fstOperator " / "
syn match fstOperator "%"
syn match fstOperator "<"
syn match fstOperator ">"
syn match fstOperator ">="
syn match fstOperator "<="
syn match fstOperator "!="
syn match fstOperator "=="
syn match fstOperator "&"
syn match fstOperator "\^"
syn match fstOperator "|"
syn match fstOperator "<<"
syn match fstOperator ">>"
syn match fstOperator ":"
syn match fstOperator ","
syn match fstOperator "<:"
syn match fstOperator ":>"
syn match fstOperator "\~"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" faust brackets
syn match fstAoperator "("
syn match fstAoperator ")"
" String
syn region fstString start=+"+ skip=+\\\\\|\\"+ end=+"+
" Color definition
hi link fstAoperator Statement
hi link fstPrims Label
hi link fstOps Identifier
hi link fstOperator Special
hi link fstComment Comment
hi link fstString String
" The name of the syntax is faust
let b:current_syntax = "faust"
|