annotate vendor/vim-syntax/typescript.vim @ 620:7ac088ee101a

Add typescript vim syntax
author nanaya <me@nanaya.pro>
date Tue, 30 Oct 2018 19:04:56 +0900
parents
children 11e00204fb18
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
620
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
1 " Vim syntax file
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
2 " Language: typescript
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
3 " Author: MicroSoft Open Technologies Inc.
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
4 " Version: 0.1
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
5 " Credits: Zhao Yi, Claudio Fleiner, Scott Shattuck, Jose Elera Campana
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
6
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
7 if !exists("main_syntax")
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
8 if version < 600
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
9 syntax clear
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
10 elseif exists("b:current_syntax")
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
11 finish
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
12 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
13 let main_syntax = "typescript"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
14 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
15
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
16 " Drop fold if it set but vim doesn't support it.
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
17 if version < 600 && exists("typescript_fold")
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
18 unlet typescript_fold
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
19 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
20
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
21 "" dollar sign is permitted anywhere in an identifier
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
22 setlocal iskeyword+=$
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
23
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
24 syntax sync fromstart
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
25
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
26 "" syntax coloring for Node.js shebang line
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
27 syn match shebang "^#!.*/bin/env\s\+node\>"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
28 hi link shebang Comment
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
29
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
30 "" typescript comments"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
31 syn keyword typescriptCommentTodo TODO FIXME XXX TBD contained
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
32 syn match typescriptLineComment "\/\/.*" contains=@Spell,typescriptCommentTodo,typescriptRef
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
33 syn match typescriptRefComment /\/\/\/<\(reference\|amd-\(dependency\|module\)\)\s\+.*\/>$/ contains=typescriptRefD,typescriptRefS
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
34 syn region typescriptRefD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
35 syn region typescriptRefS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
36
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
37 syn match typescriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
38 syn region typescriptComment start="/\*" end="\*/" contains=@Spell,typescriptCommentTodo extend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
39 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
40 "" JSDoc support start"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
41 if !exists("typescript_ignore_typescriptdoc")
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
42 syntax case ignore
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
43
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
44 " syntax coloring for JSDoc comments (HTML)
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
45 "unlet b:current_syntax
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
46
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
47 syntax region typescriptDocComment start="/\*\*\s*$" end="\*/" contains=typescriptDocTags,typescriptCommentTodo,typescriptCvsTag,@typescriptHtml,@Spell fold extend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
48 syntax match typescriptDocTags contained "@\(param\|argument\|requires\|exception\|throws\|type\|class\|extends\|see\|link\|member\|module\|method\|title\|namespace\|optional\|default\|base\|file\|returns\=\)\>" nextgroup=typescriptDocParam,typescriptDocSeeTag skipwhite
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
49 syntax match typescriptDocTags contained "@\(beta\|deprecated\|description\|fileoverview\|author\|license\|version\|constructor\|private\|protected\|final\|ignore\|addon\|exec\)\>"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
50 syntax match typescriptDocParam contained "\%(#\|\w\|\.\|:\|\/\)\+"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
51 syntax region typescriptDocSeeTag contained matchgroup=typescriptDocSeeTag start="{" end="}" contains=typescriptDocTags
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
52
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
53 syntax case match
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
54 endif "" JSDoc end
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
55 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
56 syntax case match
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
57
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
58 "" Syntax in the typescript code"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
59 syn match typescriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}" contained containedin=typescriptStringD,typescriptStringS,typescriptStringB display
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
60 syn region typescriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=typescriptSpecial,@htmlPreproc extend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
61 syn region typescriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=typescriptSpecial,@htmlPreproc extend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
62 syn region typescriptStringB start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=typescriptInterpolation,typescriptSpecial,@htmlPreproc extend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
63
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
64 syn region typescriptInterpolation matchgroup=typescriptInterpolationDelimiter
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
65 \ start=/${/ end=/}/ contained
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
66 \ contains=@typescriptExpression
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
67
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
68 syn match typescriptNumber "-\=\<\d[0-9_]*L\=\>" display
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
69 syn match typescriptNumber "-\=\<0[xX][0-9a-fA-F][0-9a-fA-F_]*\>" display
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
70 syn match typescriptNumber "-\=\<0[bB][01][01_]*\>" display
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
71 syn match typescriptNumber "-\=\<0[oO]\o[0-7_]*\>" display
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
72 syn region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
73 " syntax match typescriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\."
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
74 " syntax region typescriptStringD start=+"+ skip=+\\\\\|\\$"+ end=+"+ contains=typescriptSpecial,@htmlPreproc
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
75 " syntax region typescriptStringS start=+'+ skip=+\\\\\|\\$'+ end=+'+ contains=typescriptSpecial,@htmlPreproc
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
76 " syntax region typescriptRegexpString start=+/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gim]\{,3}+ contains=typescriptSpecial,@htmlPreproc oneline
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
77 " syntax match typescriptNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
78 syntax match typescriptFloat /\<-\=\%(\d[0-9_]*\.\d[0-9_]*\|\d[0-9_]*\.\|\.\d[0-9]*\)\%([eE][+-]\=\d[0-9_]*\)\=\>/
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
79 " syntax match typescriptLabel /\(?\s*\)\@<!\<\w\+\(\s*:\)\@=/
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
80
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
81 syn match typescriptDecorators /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
82 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
83 "" typescript Prototype"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
84 syntax keyword typescriptPrototype contained prototype
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
85 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
86 " DOM, Browser and Ajax Support {{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
87 """"""""""""""""""""""""
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
88 if get(g:, 'typescript_ignore_browserwords', 0)
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
89 syntax keyword typescriptBrowserObjects window navigator screen history location
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
90
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
91 syntax keyword typescriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
92 syntax keyword typescriptDOMMethods contained createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
93 syntax keyword typescriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
94
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
95 syntax keyword typescriptAjaxObjects XMLHttpRequest
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
96 syntax keyword typescriptAjaxProperties contained readyState responseText responseXML statusText
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
97 syntax keyword typescriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
98
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
99 syntax keyword typescriptPropietaryObjects ActiveXObject
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
100 syntax keyword typescriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
101
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
102 syntax keyword typescriptHtmlElemProperties contained className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
103
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
104 syntax keyword typescriptEventListenerKeywords contained blur click focus mouseover mouseout load item
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
105
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
106 syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
107 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
108 " }}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
109 "" Programm Keywords"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
110 syntax keyword typescriptSource import export from as
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
111 syntax keyword typescriptIdentifier arguments this void
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
112 syntax keyword typescriptStorageClass let var const
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
113 syntax keyword typescriptOperator delete new instanceof typeof
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
114 syntax keyword typescriptBoolean true false
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
115 syntax keyword typescriptNull null undefined
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
116 syntax keyword typescriptMessage alert confirm prompt status
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
117 syntax keyword typescriptGlobal self top parent
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
118 syntax keyword typescriptDeprecated escape unescape all applets alinkColor bgColor fgColor linkColor vlinkColor xmlEncoding
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
119 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
120 "" Statement Keywords"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
121 syntax keyword typescriptConditional if else switch
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
122 syntax keyword typescriptRepeat do while for in of
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
123 syntax keyword typescriptBranch break continue yield await
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
124 syntax keyword typescriptLabel case default async readonly
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
125 syntax keyword typescriptStatement return with
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
126
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
127 syntax keyword typescriptGlobalObjects Array Boolean Date Function Infinity Math Number NaN Object Packages RegExp String Symbol netscape
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
128
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
129 syntax keyword typescriptExceptions try catch throw finally Error EvalError RangeError ReferenceError SyntaxError TypeError URIError
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
130
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
131 syntax keyword typescriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws goto private transient debugger implements protected volatile double import public type namespace from get set keyof
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
132 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
133 "" typescript/DOM/HTML/CSS specified things"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
134
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
135 " typescript Objects"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
136 syn match typescriptFunction "(super\s*|constructor\s*)" contained nextgroup=typescriptVars
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
137 syn region typescriptVars start="(" end=")" contained contains=typescriptParameters transparent keepend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
138 syn match typescriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
139 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
140 " DOM2 Objects"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
141 syntax keyword typescriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number symbol never object unknown
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
142 syntax keyword typescriptExceptions DOMException
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
143 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
144 " DOM2 CONSTANT"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
145 syntax keyword typescriptDomErrNo INDEX_SIZE_ERR DOMSTRING_SIZE_ERR HIERARCHY_REQUEST_ERR WRONG_DOCUMENT_ERR INVALID_CHARACTER_ERR NO_DATA_ALLOWED_ERR NO_MODIFICATION_ALLOWED_ERR NOT_FOUND_ERR NOT_SUPPORTED_ERR INUSE_ATTRIBUTE_ERR INVALID_STATE_ERR SYNTAX_ERR INVALID_MODIFICATION_ERR NAMESPACE_ERR INVALID_ACCESS_ERR
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
146 syntax keyword typescriptDomNodeConsts ELEMENT_NODE ATTRIBUTE_NODE TEXT_NODE CDATA_SECTION_NODE ENTITY_REFERENCE_NODE ENTITY_NODE PROCESSING_INSTRUCTION_NODE COMMENT_NODE DOCUMENT_NODE DOCUMENT_TYPE_NODE DOCUMENT_FRAGMENT_NODE NOTATION_NODE
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
147 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
148 " HTML events and internal variables"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
149 syntax case ignore
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
150 syntax keyword typescriptHtmlEvents onblur onclick oncontextmenu ondblclick onfocus onkeydown onkeypress onkeyup onmousedown onmousemove onmouseout onmouseover onmouseup onresize onload onsubmit
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
151 syntax case match
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
152 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
153
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
154 " Follow stuff should be highligh within a special context
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
155 " While it can't be handled with context depended with Regex based highlight
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
156 " So, turn it off by default
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
157 if exists("typescript_enable_domhtmlcss")
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
158
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
159 " DOM2 things"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
160 syntax match typescriptDomElemAttrs contained /\%(nodeName\|nodeValue\|nodeType\|parentNode\|childNodes\|firstChild\|lastChild\|previousSibling\|nextSibling\|attributes\|ownerDocument\|namespaceURI\|prefix\|localName\|tagName\)\>/
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
161 syntax match typescriptDomElemFuncs contained /\%(insertBefore\|replaceChild\|removeChild\|appendChild\|hasChildNodes\|cloneNode\|normalize\|isSupported\|hasAttributes\|getAttribute\|setAttribute\|removeAttribute\|getAttributeNode\|setAttributeNode\|removeAttributeNode\|getElementsByTagName\|getAttributeNS\|setAttributeNS\|removeAttributeNS\|getAttributeNodeNS\|setAttributeNodeNS\|getElementsByTagNameNS\|hasAttribute\|hasAttributeNS\)\>/ nextgroup=typescriptParen skipwhite
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
162 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
163 " HTML things"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
164 syntax match typescriptHtmlElemAttrs contained /\%(className\|clientHeight\|clientLeft\|clientTop\|clientWidth\|dir\|id\|innerHTML\|lang\|length\|offsetHeight\|offsetLeft\|offsetParent\|offsetTop\|offsetWidth\|scrollHeight\|scrollLeft\|scrollTop\|scrollWidth\|style\|tabIndex\|title\)\>/
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
165 syntax match typescriptHtmlElemFuncs contained /\%(blur\|click\|focus\|scrollIntoView\|addEventListener\|dispatchEvent\|removeEventListener\|item\)\>/ nextgroup=typescriptParen skipwhite
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
166 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
167 " CSS Styles in typescript"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
168 syntax keyword typescriptCssStyles contained color font fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight letterSpacing lineBreak lineHeight quotes rubyAlign rubyOverhang rubyPosition
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
169 syntax keyword typescriptCssStyles contained textAlign textAlignLast textAutospace textDecoration textIndent textJustify textJustifyTrim textKashidaSpace textOverflowW6 textShadow textTransform textUnderlinePosition
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
170 syntax keyword typescriptCssStyles contained unicodeBidi whiteSpace wordBreak wordSpacing wordWrap writingMode
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
171 syntax keyword typescriptCssStyles contained bottom height left position right top width zIndex
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
172 syntax keyword typescriptCssStyles contained border borderBottom borderLeft borderRight borderTop borderBottomColor borderLeftColor borderTopColor borderBottomStyle borderLeftStyle borderRightStyle borderTopStyle borderBottomWidth borderLeftWidth borderRightWidth borderTopWidth borderColor borderStyle borderWidth borderCollapse borderSpacing captionSide emptyCells tableLayout
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
173 syntax keyword typescriptCssStyles contained margin marginBottom marginLeft marginRight marginTop outline outlineColor outlineStyle outlineWidth padding paddingBottom paddingLeft paddingRight paddingTop
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
174 syntax keyword typescriptCssStyles contained listStyle listStyleImage listStylePosition listStyleType
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
175 syntax keyword typescriptCssStyles contained background backgroundAttachment backgroundColor backgroundImage gackgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
176 syntax keyword typescriptCssStyles contained clear clip clipBottom clipLeft clipRight clipTop content counterIncrement counterReset cssFloat cursor direction display filter layoutGrid layoutGridChar layoutGridLine layoutGridMode layoutGridType
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
177 syntax keyword typescriptCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
178 syntax keyword typescriptCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
179 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
180 endif "DOM/HTML/CSS
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
181
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
182 " Highlight ways"{{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
183 syntax match typescriptDotNotation "\." nextgroup=typescriptPrototype,typescriptDomElemAttrs,typescriptDomElemFuncs,typescriptDOMMethods,typescriptDOMProperties,typescriptHtmlElemAttrs,typescriptHtmlElemFuncs,typescriptHtmlElemProperties,typescriptAjaxProperties,typescriptAjaxMethods,typescriptPropietaryMethods,typescriptEventListenerMethods skipwhite skipnl
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
184 syntax match typescriptDotNotation "\.style\." nextgroup=typescriptCssStyles
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
185 "}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
186
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
187 "" end DOM/HTML/CSS specified things""}}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
188
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
189
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
190 "" Code blocks
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
191 syntax cluster typescriptAll contains=typescriptComment,typescriptLineComment,typescriptDocComment,typescriptStringD,typescriptStringS,typescriptStringB,typescriptRegexpString,typescriptNumber,typescriptFloat,typescriptDecorators,typescriptLabel,typescriptSource,typescriptType,typescriptOperator,typescriptBoolean,typescriptNull,typescriptFuncKeyword,typescriptConditional,typescriptGlobal,typescriptRepeat,typescriptBranch,typescriptStatement,typescriptGlobalObjects,typescriptMessage,typescriptIdentifier,typescriptStorageClass,typescriptExceptions,typescriptReserved,typescriptDeprecated,typescriptDomErrNo,typescriptDomNodeConsts,typescriptHtmlEvents,typescriptDotNotation,typescriptBrowserObjects,typescriptDOMObjects,typescriptAjaxObjects,typescriptPropietaryObjects,typescriptDOMMethods,typescriptHtmlElemProperties,typescriptDOMProperties,typescriptEventListenerKeywords,typescriptEventListenerMethods,typescriptAjaxProperties,typescriptAjaxMethods,typescriptFuncArg
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
192
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
193 if main_syntax == "typescript"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
194 syntax sync clear
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
195 syntax sync ccomment typescriptComment minlines=200
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
196 " syntax sync match typescriptHighlight grouphere typescriptBlock /{/
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
197 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
198
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
199 syntax keyword typescriptFuncKeyword function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
200 "syntax region typescriptFuncDef start="function" end="\(.*\)" contains=typescriptFuncKeyword,typescriptFuncArg keepend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
201 "syntax match typescriptFuncArg "\(([^()]*)\)" contains=typescriptParens,typescriptFuncComma contained
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
202 "syntax match typescriptFuncComma /,/ contained
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
203 " syntax region typescriptFuncBlock contained matchgroup=typescriptFuncBlock start="{" end="}" contains=@typescriptAll,typescriptParensErrA,typescriptParensErrB,typescriptParen,typescriptBracket,typescriptBlock fold
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
204
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
205 syn match typescriptBraces "[{}\[\]]"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
206 syn match typescriptParens "[()]"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
207 syn match typescriptOpSymbols "=\{1,3}\|!==\|!=\|<\|>\|>=\|<=\|++\|+=\|--\|-="
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
208 syn match typescriptEndColons "[;,]"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
209 syn match typescriptLogicSymbols "\(&&\)\|\(||\)"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
210
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
211 " typescriptFold Function {{{
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
212
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
213 " function! typescriptFold()
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
214
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
215 " skip curly braces inside RegEx's and comments
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
216 syn region foldBraces start=/{/ skip=/\(\/\/.*\)\|\(\/.*\/\)/ end=/}/ transparent fold keepend extend
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
217
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
218 " setl foldtext=FoldText()
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
219 " endfunction
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
220
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
221 " au FileType typescript call typescriptFold()
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
222
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
223 " }}}
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
224
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
225 " Define the default highlighting.
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
226 " For version 5.7 and earlier: only when not done already
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
227 " For version 5.8 and later: only when an item doesn't have highlighting yet
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
228 if version >= 508 || !exists("did_typescript_syn_inits")
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
229 if version < 508
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
230 let did_typescript_syn_inits = 1
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
231 command -nargs=+ HiLink hi link <args>
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
232 else
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
233 command -nargs=+ HiLink hi def link <args>
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
234 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
235
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
236 "typescript highlighting
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
237 HiLink typescriptParameters Operator
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
238 HiLink typescriptSuperBlock Operator
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
239
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
240 HiLink typescriptEndColons Exception
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
241 HiLink typescriptOpSymbols Operator
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
242 HiLink typescriptLogicSymbols Boolean
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
243 HiLink typescriptBraces Function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
244 HiLink typescriptParens Operator
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
245 HiLink typescriptComment Comment
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
246 HiLink typescriptLineComment Comment
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
247 HiLink typescriptRefComment Include
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
248 HiLink typescriptRefS String
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
249 HiLink typescriptRefD String
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
250 HiLink typescriptDocComment Comment
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
251 HiLink typescriptCommentTodo Todo
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
252 HiLink typescriptCvsTag Function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
253 HiLink typescriptDocTags Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
254 HiLink typescriptDocSeeTag Function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
255 HiLink typescriptDocParam Function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
256 HiLink typescriptStringS String
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
257 HiLink typescriptStringD String
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
258 HiLink typescriptStringB String
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
259 HiLink typescriptInterpolationDelimiter Delimiter
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
260 HiLink typescriptRegexpString String
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
261 HiLink typescriptGlobal Constant
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
262 HiLink typescriptCharacter Character
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
263 HiLink typescriptPrototype Type
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
264 HiLink typescriptConditional Conditional
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
265 HiLink typescriptBranch Conditional
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
266 HiLink typescriptIdentifier Identifier
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
267 HiLink typescriptStorageClass StorageClass
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
268 HiLink typescriptRepeat Repeat
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
269 HiLink typescriptStatement Statement
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
270 HiLink typescriptFuncKeyword Function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
271 HiLink typescriptMessage Keyword
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
272 HiLink typescriptDeprecated Exception
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
273 HiLink typescriptError Error
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
274 HiLink typescriptParensError Error
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
275 HiLink typescriptParensErrA Error
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
276 HiLink typescriptParensErrB Error
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
277 HiLink typescriptParensErrC Error
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
278 HiLink typescriptReserved Keyword
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
279 HiLink typescriptOperator Operator
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
280 HiLink typescriptType Type
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
281 HiLink typescriptNull Type
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
282 HiLink typescriptNumber Number
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
283 HiLink typescriptFloat Number
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
284 HiLink typescriptDecorators Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
285 HiLink typescriptBoolean Boolean
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
286 HiLink typescriptLabel Label
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
287 HiLink typescriptSpecial Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
288 HiLink typescriptSource Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
289 HiLink typescriptGlobalObjects Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
290 HiLink typescriptExceptions Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
291
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
292 HiLink typescriptDomErrNo Constant
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
293 HiLink typescriptDomNodeConsts Constant
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
294 HiLink typescriptDomElemAttrs Label
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
295 HiLink typescriptDomElemFuncs PreProc
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
296
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
297 HiLink typescriptHtmlElemAttrs Label
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
298 HiLink typescriptHtmlElemFuncs PreProc
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
299
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
300 HiLink typescriptCssStyles Label
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
301
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
302 " Ajax Highlighting
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
303 HiLink typescriptBrowserObjects Constant
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
304
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
305 HiLink typescriptDOMObjects Constant
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
306 HiLink typescriptDOMMethods Function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
307 HiLink typescriptDOMProperties Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
308
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
309 HiLink typescriptAjaxObjects Constant
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
310 HiLink typescriptAjaxMethods Function
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
311 HiLink typescriptAjaxProperties Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
312
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
313 HiLink typescriptFuncDef Title
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
314 HiLink typescriptFuncArg Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
315 HiLink typescriptFuncComma Operator
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
316
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
317 HiLink typescriptHtmlEvents Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
318 HiLink typescriptHtmlElemProperties Special
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
319
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
320 HiLink typescriptEventListenerKeywords Keyword
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
321
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
322 HiLink typescriptNumber Number
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
323 HiLink typescriptPropietaryObjects Constant
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
324
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
325 delcommand HiLink
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
326 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
327
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
328 " Define the htmltypescript for HTML syntax html.vim
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
329 "syntax clear htmltypescript
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
330 "syntax clear typescriptExpression
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
331 syntax cluster htmltypescript contains=@typescriptAll,typescriptBracket,typescriptParen,typescriptBlock,typescriptParenError
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
332 syntax cluster typescriptExpression contains=@typescriptAll,typescriptBracket,typescriptParen,typescriptBlock,typescriptParenError,@htmlPreproc
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
333
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
334 let b:current_syntax = "typescript"
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
335 if main_syntax == 'typescript'
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
336 unlet main_syntax
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
337 endif
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
338
7ac088ee101a Add typescript vim syntax
nanaya <me@nanaya.pro>
parents:
diff changeset
339 " vim: ts=4