Mercurial > vim
comparison runtime/syntax/matlab.vim @ 2034:7bc41231fbc7
Update runtime files.
author | Bram Moolenaar <bram@zimbu.org> |
---|---|
date | Wed, 06 Jan 2010 20:54:52 +0100 |
parents | 3fc0f57ecb91 |
children | 277085346a0d |
comparison
equal
deleted
inserted
replaced
2033:de5a43c5eedc | 2034:7bc41231fbc7 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Matlab | 2 " Language: Matlab |
3 " Maintainer: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> | 3 " Maintainer: Maurizio Tranchero - maurizio.tranchero@gmail.com |
4 " Credits: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> | |
4 " Original author: Mario Eusebio | 5 " Original author: Mario Eusebio |
5 " Last Change: 30 May 2003 | 6 " Change History: |
7 " Sat Jul 25 16:14:55 CEST 2009 | |
8 " - spell check enabled only for comments (thanks to James Vega) | |
9 " | |
10 " Tue Apr 21 10:03:31 CEST 2009 | |
11 " - added object oriented support | |
12 " - added multi-line comments %{ ...\n... %} | |
6 | 13 |
7 " For version 5.x: Clear all syntax items | 14 " For version 5.x: Clear all syntax items |
8 " For version 6.x: Quit when a syntax file was already loaded | 15 " For version 6.x: Quit when a syntax file was already loaded |
9 if version < 600 | 16 if version < 600 |
10 syntax clear | 17 syntax clear |
14 | 21 |
15 syn keyword matlabStatement return | 22 syn keyword matlabStatement return |
16 syn keyword matlabLabel case switch | 23 syn keyword matlabLabel case switch |
17 syn keyword matlabConditional else elseif end if otherwise | 24 syn keyword matlabConditional else elseif end if otherwise |
18 syn keyword matlabRepeat do for while | 25 syn keyword matlabRepeat do for while |
26 " MT_ADDON - added exception-specific keywords | |
27 syn keyword matlabExceptions try catch | |
28 syn keyword matlabOO classdef properties events methods | |
19 | 29 |
20 syn keyword matlabTodo contained TODO | 30 syn keyword matlabTodo contained TODO |
21 | 31 |
22 " If you do not want these operators lit, uncommment them and the "hi link" below | 32 " If you do not want these operators lit, uncommment them and the "hi link" below |
23 syn match matlabArithmeticOperator "[-+]" | 33 syn match matlabArithmeticOperator "[-+]" |
29 syn match matlabLineContinuation "\.\{3}" | 39 syn match matlabLineContinuation "\.\{3}" |
30 | 40 |
31 "syn match matlabIdentifier "\<\a\w*\>" | 41 "syn match matlabIdentifier "\<\a\w*\>" |
32 | 42 |
33 " String | 43 " String |
34 syn region matlabString start=+'+ end=+'+ oneline | 44 " MT_ADDON - added 'skip' in order to deal with 'tic' escaping sequence |
45 syn region matlabString start=+'+ end=+'+ oneline skip=+''+ contains=@Spell | |
35 | 46 |
36 " If you don't like tabs | 47 " If you don't like tabs |
37 syn match matlabTab "\t" | 48 syn match matlabTab "\t" |
38 | 49 |
39 " Standard numbers | 50 " Standard numbers |
48 "syn match matlabDelimiter "[][()]" | 59 "syn match matlabDelimiter "[][()]" |
49 syn match matlabTransposeOperator "[])a-zA-Z0-9.]'"lc=1 | 60 syn match matlabTransposeOperator "[])a-zA-Z0-9.]'"lc=1 |
50 | 61 |
51 syn match matlabSemicolon ";" | 62 syn match matlabSemicolon ";" |
52 | 63 |
53 syn match matlabComment "%.*$" contains=matlabTodo,matlabTab | 64 syn match matlabComment "%.*$" contains=matlabTodo,matlabTab,@Spell |
65 " MT_ADDON - correctly highlights words after '...' as comments | |
66 syn match matlabComment "\.\.\..*$" contains=matlabTodo,matlabTab,@Spell | |
67 syn region matlabMultilineComment start=+%{+ end=+%}+ contains=matlabTodo,matlabTab,@Spell | |
54 | 68 |
55 syn keyword matlabOperator break zeros default margin round ones rand | 69 syn keyword matlabOperator break zeros default margin round ones rand |
56 syn keyword matlabOperator ceil floor size clear zeros eye mean std cov | 70 syn keyword matlabOperator ceil floor size clear zeros eye mean std cov |
57 | 71 |
58 syn keyword matlabFunction error eval function | 72 syn keyword matlabFunction error eval function |
73 else | 87 else |
74 command -nargs=+ HiLink hi def link <args> | 88 command -nargs=+ HiLink hi def link <args> |
75 endif | 89 endif |
76 | 90 |
77 HiLink matlabTransposeOperator matlabOperator | 91 HiLink matlabTransposeOperator matlabOperator |
78 HiLink matlabOperator Operator | 92 HiLink matlabOperator Operator |
79 HiLink matlabLineContinuation Special | 93 HiLink matlabLineContinuation Special |
80 HiLink matlabLabel Label | 94 HiLink matlabLabel Label |
81 HiLink matlabConditional Conditional | 95 HiLink matlabConditional Conditional |
96 HiLink matlabExceptions Conditional | |
82 HiLink matlabRepeat Repeat | 97 HiLink matlabRepeat Repeat |
83 HiLink matlabTodo Todo | 98 HiLink matlabTodo Todo |
84 HiLink matlabString String | 99 HiLink matlabString String |
85 HiLink matlabDelimiter Identifier | 100 HiLink matlabDelimiter Identifier |
86 HiLink matlabTransposeOther Identifier | 101 HiLink matlabTransposeOther Identifier |
87 HiLink matlabNumber Number | 102 HiLink matlabNumber Number |
88 HiLink matlabFloat Float | 103 HiLink matlabFloat Float |
89 HiLink matlabFunction Function | 104 HiLink matlabFunction Function |
90 HiLink matlabError Error | 105 HiLink matlabError Error |
91 HiLink matlabImplicit matlabStatement | 106 HiLink matlabImplicit matlabStatement |
92 HiLink matlabStatement Statement | 107 HiLink matlabStatement Statement |
108 HiLink matlabOO Statement | |
93 HiLink matlabSemicolon SpecialChar | 109 HiLink matlabSemicolon SpecialChar |
94 HiLink matlabComment Comment | 110 HiLink matlabComment Comment |
111 HiLink matlabMultilineComment Comment | |
95 | 112 |
96 HiLink matlabArithmeticOperator matlabOperator | 113 HiLink matlabArithmeticOperator matlabOperator |
97 HiLink matlabRelationalOperator matlabOperator | 114 HiLink matlabRelationalOperator matlabOperator |
98 HiLink matlabLogicalOperator matlabOperator | 115 HiLink matlabLogicalOperator matlabOperator |
99 | 116 |