neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

mel.vim (3405B)


      1 " Vim syntax file
      2 " Language:	MEL (Maya Extension Language)
      3 " Maintainer:	Robert Minsk <egbert@centropolisfx.com>
      4 " Last Change:	May 27 1999
      5 " Based on:	Bram Moolenaar <Bram@vim.org> C syntax file
      6 
      7 " quit when a syntax file was already loaded
      8 if exists("b:current_syntax")
      9  finish
     10 endif
     11 
     12 " when wanted, highlight trailing white space and spaces before tabs
     13 if exists("mel_space_errors")
     14  sy match	melSpaceError	"\s\+$"
     15  sy match	melSpaceError	" \+\t"me=e-1
     16 endif
     17 
     18 " A bunch of useful MEL keywords
     19 sy keyword	melBoolean	true false yes no on off
     20 
     21 sy keyword	melFunction	proc
     22 sy match	melIdentifier	"\$\(\a\|_\)\w*"
     23 
     24 sy keyword	melStatement	break continue return
     25 sy keyword	melConditional	if else switch
     26 sy keyword	melRepeat	while for do in
     27 sy keyword	melLabel	case default
     28 sy keyword	melOperator	size eval env exists whatIs
     29 sy keyword	melKeyword	alias
     30 sy keyword	melException	catch error warning
     31 
     32 sy keyword	melInclude	source
     33 
     34 sy keyword	melType		int float string vector matrix
     35 sy keyword	melStorageClass	global
     36 
     37 sy keyword	melDebug	trace
     38 
     39 sy keyword	melTodo		contained TODO FIXME XXX
     40 
     41 " MEL data types
     42 sy match	melCharSpecial	contained "\\[ntr\\"]"
     43 sy match	melCharError	contained "\\[^ntr\\"]"
     44 
     45 sy region	melString	start=+"+ skip=+\\"+ end=+"+ contains=melCharSpecial,melCharError
     46 
     47 sy case ignore
     48 sy match	melInteger	"\<\d\+\(e[-+]\=\d\+\)\=\>"
     49 sy match	melFloat	"\<\d\+\(e[-+]\=\d\+\)\=f\>"
     50 sy match	melFloat	"\<\d\+\.\d*\(e[-+]\=\d\+\)\=f\=\>"
     51 sy match	melFloat	"\.\d\+\(e[-+]\=\d\+\)\=f\=\>"
     52 sy case match
     53 
     54 sy match	melCommaSemi	contained "[,;]"
     55 sy region	melMatrixVector	start=/<</ end=/>>/ contains=melInteger,melFloat,melIdentifier,melCommaSemi
     56 
     57 sy cluster	melGroup	contains=melFunction,melStatement,melConditional,melLabel,melKeyword,melStorageClass,melTODO,melCharSpecial,melCharError,melCommaSemi
     58 
     59 " catch errors caused by wrong parenthesis
     60 sy region	melParen	transparent start='(' end=')' contains=ALLBUT,@melGroup,melParenError,melInParen
     61 sy match	melParenError	")"
     62 sy match	melInParen	contained "[{}]"
     63 
     64 " comments
     65 sy region	melComment	start="/\*" end="\*/" contains=melTodo,melSpaceError
     66 sy match	melComment	"//.*" contains=melTodo,melSpaceError
     67 sy match	melCommentError "\*/"
     68 
     69 sy region	melQuestionColon matchgroup=melConditional transparent start='?' end=':' contains=ALLBUT,@melGroup
     70 
     71 if !exists("mel_minlines")
     72  let mel_minlines=15
     73 endif
     74 exec "sy sync ccomment melComment minlines=" . mel_minlines
     75 
     76 " Define the default highlighting.
     77 " Only when an item doesn't have highlighting yet
     78 
     79 hi def link melBoolean	Boolean
     80 hi def link melFunction	Function
     81 hi def link melIdentifier	Identifier
     82 hi def link melStatement	Statement
     83 hi def link melConditional Conditional
     84 hi def link melRepeat	Repeat
     85 hi def link melLabel	Label
     86 hi def link melOperator	Operator
     87 hi def link melKeyword	Keyword
     88 hi def link melException	Exception
     89 hi def link melInclude	Include
     90 hi def link melType	Type
     91 hi def link melStorageClass StorageClass
     92 hi def link melDebug	Debug
     93 hi def link melTodo	Todo
     94 hi def link melCharSpecial SpecialChar
     95 hi def link melString	String
     96 hi def link melInteger	Number
     97 hi def link melFloat	Float
     98 hi def link melMatrixVector Float
     99 hi def link melComment	Comment
    100 hi def link melError	Error
    101 hi def link melSpaceError	melError
    102 hi def link melCharError	melError
    103 hi def link melParenError	melError
    104 hi def link melInParen	melError
    105 hi def link melCommentError melError
    106 
    107 
    108 let b:current_syntax = "mel"