initial commit

This commit is contained in:
2015-03-29 18:22:30 -04:00
commit c491f0fea7
146 changed files with 14482 additions and 0 deletions

3
.vim/syntax/c.vim Normal file
View File

@@ -0,0 +1,3 @@
syn keyword cAssert ASSERT REQUIRES ENSURES
hi def link cAssert Keyword

217
.vim/syntax/c0.vim Normal file
View File

@@ -0,0 +1,217 @@
" Vim syntax file
" Language: C0
" Maintainer: Josiah Boning (jboning)
" Last Change: 2010 Sep 7
" A modification of the standard vim C syntax file by Bram.
"
" place in .vim/syntax/
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
" A bunch of useful C keywords
syn keyword cStatement break return continue
syn keyword cConditional if else
syn keyword cRepeat while for
syn keyword cMemory alloc alloc_array
syn keyword cAssert assert
syn keyword cTodo contained TODO FIXME XXX
" It's easy to accidentally add a space after a backslash that was intended
" for line continuation. Some compilers allow it, which makes it
" unpredicatable and should be avoided.
syn match cBadContinuation contained "\\\s\+$"
" cCommentGroup allows adding matches for special things in comments
syn cluster cCommentGroup contains=cTodo,cBadContinuation
" String and Character constants
" Highlight special characters (those which have a backslash) differently
syn match cSpecialError display contained "\\[^0'\"?\\abfnrtv]"
syn match cSpecial display contained "\\[0'\"?\\abfnrtv]"
if exists("c_no_cformat")
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cSpecialError,@Spell
else
if !exists("c_no_c99") " ISO C99
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
else
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained
endif
syn match cFormat display "%%" contained
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cSpecialError,cFormat,@Spell
endif
syn match cCharacter "L\='[^\\]'"
"syn match cCharacter "L\='[^']*'" contains=cSpecial,cSpecialError
syn match cSpecialCharErr "L\='\\[^0'\"?\\abfnrtv]'"
syn match cSpecialCharacter "L\='\\[0'\"?\\abfnrtv]'"
"when wanted, highlight trailing white space
if exists("c_space_errors")
if !exists("c_no_trail_space_error")
syn match cSpaceError display excludenl "\s\+$"
endif
if !exists("c_no_tab_space_error")
syn match cSpaceError display " \+\t"me=e-1
endif
endif
" This should be before cErrInParen to avoid problems with #define ({ xxx })
if exists("c_curly_error")
syntax match cCurlyError "}"
syntax region cBlock start="{" end="}" contains=ALLBUT,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@Spell fold
else
syntax region cBlock start="{" end="}" transparent fold
endif
"catch errors caused by wrong parenthesis and brackets
syn cluster cParenGroup contains=cParenError,cUse,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cBitField,cCppOut,cCppOut2,cCppSkip,cFormat,cNumber,cNumbersCom
if exists("c_no_curly_error")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "^[{}]"
elseif exists("c_no_bracket_error")
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
syn match cParenError display ")"
syn match cErrInParen display contained "[{}]"
else
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@Spell
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell
syn match cParenError display "[\])]"
syn match cErrInParen display contained "[\]{}]"
syn region cBracket transparent start='\[' end=']' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@Spell
" cCppBracket: same as cParen but ends at end-of-line; used in cDefine
syn region cCppBracket transparent start='\[' skip='\\$' excludenl end=']' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell
syn match cErrInBracket display contained "[);{}]"
endif
"integer number
syn case ignore
syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber
syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>"
"hex number
syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>"
syn case match
" c0 annotations
syntax keyword cAnnoSpec contained requires ensures loop_invariant assert
syntax match cAnnoVal contained "\\\(result\|length\|old\)"
if exists("c_comment_strings")
" A comment can contain cString, cCharacter and cNumber.
" But a "*/" inside a cString in a cComment DOES end the comment! So we
" need to use a special type of cString: cCommentString, which also ends on
" "*/", and sees a "*" at the start of the line as comment again.
" Unfortunately this doesn't very well work for // type of comments :-(
syntax match cCommentSkip contained "^\s*\*\($\|\s\+\)"
syntax region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
syntax region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
syntax region cCommentL start="//" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
syntax region cAnnoL start="//@" end="$" keepend contains=cAnnoSpec,cAnnoVal,@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
if exists("c_no_comment_fold")
" Use "extend" here to have preprocessor lines not terminate halfway a
" comment.
syntax region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell extend
syntax region cAnno matchgroup=cCommentStart start="/\*@" end="@\*/" contains=cAnnoSpec,cAnnoVal,@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell extend
else
syntax region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell fold extend
syntax region cAnno matchgroup=cCommentStart start="/\*@" end="@\*/" contains=cAnnoSpec,cAnnoVal,@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell fold extend
endif
else
syn region cCommentL start="//" end="$" keepend contains=@cCommentGroup,cSpaceError,@Spell
syn region cAnnoL start="//@" end="$" keepend contains=cAnnoSpec,cAnnoVal,@cCommentGroup,cSpaceError,@Spell
if exists("c_no_comment_fold")
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell extend
syn region cAnno matchgroup=cCommentStart start="/\*@" end="@\*/" contains=cAnnoSpec,cAnnoVal,@cCommentGroup,cCommentStartError,cSpaceError,@Spell extend
else
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell fold extend
syn region cAnno matchgroup=cCommentStart start="/\*@" end="@\*/" contains=cAnnoSpec,cAnnoVal,@cCommentGroup,cCommentStartError,cSpaceError,@Spell fold extend
endif
endif
" keep a // comment separately, it terminates a preproc. conditional
syntax match cCommentError display "\*/"
syntax match cCommentStartError display "/\*"me=e-1 contained
syn keyword cType int bool char string void
syn keyword cStructure struct typedef
syn keyword cConstant true false NULL
syn region cUsed display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
" We need the ^.*use.* so a < b->c and the like don't trigger #use highlighting
syn match cUsed display contained "^.*use.*<[^>]*>"
syn match cUse display "^\s*#\s*use\>\s*["<]" contains=cUsed
if exists("c_minlines")
let b:c_minlines = c_minlines
else
if !exists("c_no_if0")
let b:c_minlines = 50 " #if 0 constructs can be long
else
let b:c_minlines = 15 " mostly for () constructs
endif
endif
if exists("c_curly_error")
syn sync fromstart
else
exec "syn sync ccomment cComment minlines=" . b:c_minlines
endif
" Define the default highlighting.
" Only used when an item doesn't have highlighting yet
hi def link cFormat cSpecial
hi def link cCommentL cComment
hi def link cAnnoL cAnno
hi def link cCommentStart cComment
hi def link cConditional Conditional
hi def link cRepeat Repeat
hi def link cMemory Keyword
hi def link cAssert Keyword
hi def link cCharacter Character
hi def link cSpecialCharacter cSpecial
hi def link cNumber Number
hi def link cParenError cError
hi def link cErrInParen cError
hi def link cErrInBracket cError
hi def link cCommentError cError
hi def link cCommentStartError cError
hi def link cSpaceError cError
hi def link cSpecialCharErr cError
hi def link cSpecialError cError
hi def link cCurlyError cError
hi def link cStructure Structure
hi def link cUse Include
hi def link cUsed cString
hi def link cError Error
hi def link cStatement Statement
hi def link cPreCondit PreCondit
hi def link cType Type
hi def link cConstant Constant
hi def link cCommentString cString
hi def link cComment2String cString
hi def link cCommentSkip cComment
hi def link cString String
hi def link cComment Comment
hi def link cAnno Comment
hi def link cAnnoSpec Keyword
hi def link cAnnoVal Keyword
hi def link cSpecial SpecialChar
hi def link cTodo Todo
hi def link cBadContinuation Error
hi def link cCppSkip cCppOut
hi def link cCppOut2 cCppOut
hi def link cCppOut Comment
let b:current_syntax = "c0"
" vim: ts=8

89
.vim/syntax/jade.vim Normal file
View File

@@ -0,0 +1,89 @@
" Vim syntax file
" Language: Jade
" Maintainer: Joshua Borton
" Credits: Tim Pope
" Filenames: *.jade
if exists("b:current_syntax")
finish
endif
if !exists("main_syntax")
let main_syntax = 'jade'
endif
runtime! syntax/html.vim
runtime! syntax/html/html5.vim
silent! syntax include @htmlCoffeescript syntax/coffee.vim
unlet! b:current_syntax
silent! syntax include @htmlStylus syntax/stylus.vim
unlet! b:current_syntax
silent! syntax include @htmlMarkdown syntax/markdown.vim
unlet! b:current_syntax
syn case match
syn region javascriptParenthesisBlock start="(" end=")" contains=@htmlJavascript contained keepend
syn cluster htmlJavascript add=javascriptParenthesisBlock
syn region jadeJavascript matchgroup=jadeJavascriptOutputChar start="[!&]\==\|\~" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend
syn region jadeJavascript matchgroup=jadeJavascriptChar start="-" skip=",\s*$" end="$" contained contains=@htmlJavascript keepend
syn cluster jadeTop contains=jadeBegin,jadeComment,jadeHtmlComment,jadeJavascript
syn match jadeBegin "^\s*\%([<>]\|&[^=~ ]\)\@!" nextgroup=jadeTag,jadeClassChar,jadeIdChar,jadePlainChar,jadeJavascript,jadeScriptConditional,jadeScriptStatement
syn match jadeTag "+\?\w\+\%(:\w\+\)\=" contained contains=htmlTagName,htmlSpecialTagName nextgroup=@jadeComponent
syn cluster jadeComponent contains=jadeAttributes,jadeIdChar,jadeBlockExpansionChar,jadeClassChar,jadePlainChar,jadeJavascript
syn match jadeComment '\s*\/\/.*$'
syn region jadeHtmlComment start="^\z(\s*\)/" end="^\%(\z1\s\|\s*$\)\@!"
syn region jadeAttributes matchgroup=jadeAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,jadeHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@jadeComponent
syn match jadeClassChar "\." contained nextgroup=jadeClass
syn match jadeBlockExpansionChar ":\s" contained nextgroup=jadeTag
syn match jadeIdChar "#{\@!" contained nextgroup=jadeId
syn match jadeClass "\%(\w\|-\)\+" contained nextgroup=@jadeComponent
syn match jadeId "\%(\w\|-\)\+" contained nextgroup=@jadeComponent
syn region jadeDocType start="^\s*\(!!!\|doctype\)" end="$"
" Unless I'm mistaken, syntax/html.vim requires
" that the = sign be present for these matches.
" This adds the matches back for jade.
syn keyword jadeHtmlArg contained href title
syn match jadePlainChar "\\" contained
syn region jadeInterpolation matchgroup=jadeInterpolationDelimiter start="#{" end="}" contains=@htmlJavascript
syn match jadeInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)"
syn region jadeJavascriptFilter matchgroup=jadeFilter start="^\z(\s*\):javascript\s*$" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript
syn region jadeCoffeescriptFilter matchgroup=jadeFilter start="^\z(\s*\):coffeescript\s*$" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlCoffeescript
syn region jadeMarkdownFilter matchgroup=jadeFilter start=/^\z(\s*\):markdown\s*$/ end=/^\%(\z1\s\|\s*$\)\@!/ contains=@htmlMarkdown
syn region jadeStylusFilter matchgroup=jadeFilter start="^\z(\s*\):stylus\s*$" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlStylus
syn region jadePlainFilter matchgroup=jadeFilter start="^\z(\s*\):\%(sass\|less\|cdata\)\s*$" end="^\%(\z1\s\|\s*$\)\@!"
syn match jadeScriptConditional "\<\%(if\|else\|unless\|while\|for\|until\|case\|when\|default\)\>[?!]\@!"
syn match jadeScriptStatement "\<\%(each\|block\|prepend\|append\|mixin\|extends\|include\)\>[?!]\@!"
syn region jadeJavascript start="^\z(\s*\)script\%(:\w\+\)\=" end="^\%(\z1\s\|\s*$\)\@!" contains=@htmlJavascript,jadeJavascriptTag keepend
syn region jadeJavascriptTag contained start="^\z(\s*\)script\%(:\w\+\)\=" end="$" contains=jadeBegin,jadeTag
syn region jadeCssBlock start="^\z(\s*\)style" nextgroup=@jadeComponent,jadeError end="^\%(\z1\s\|\s*$\)\@!" contains=@jadeTop,@htmlCss keepend
syn match jadeError "\$" contained
hi def link jadePlainChar Special
hi def link jadeScriptConditional PreProc
hi def link jadeScriptStatement PreProc
hi def link jadeHtmlArg htmlArg
hi def link jadeAttributeString String
hi def link jadeAttributesDelimiter Identifier
hi def link jadeIdChar Special
hi def link jadeClassChar Special
hi def link jadeBlockExpansionChar Special
hi def link jadeId Identifier
hi def link jadeClass Type
hi def link jadeInterpolationDelimiter Delimiter
hi def link jadeFilter PreProc
hi def link jadeDocType PreProc
hi def link jadeComment Comment
hi def link jadeHtmlComment jadeComment
let b:current_syntax = "jade"
if main_syntax == "jade"
unlet main_syntax
endif

312
.vim/syntax/javascript.vim Normal file
View File

@@ -0,0 +1,312 @@
" Vim syntax file
" Language: JavaScript
" Maintainer: vim-javascript community
" URL: https://github.com/pangloss/vim-javascript
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'javascript'
endif
if !exists('g:javascript_conceal')
let g:javascript_conceal = 0
endif
"" Drop fold if it is set but VIM doesn't support it.
let b:javascript_fold='true'
if version < 600 " Don't support the old version
unlet! b:javascript_fold
endif
"" dollar sign is permittd anywhere in an identifier
setlocal iskeyword+=$
syntax sync fromstart
syntax match jsNoise /\%(:\|,\|\;\|\.\)/
"" Program Keywords
syntax keyword jsStorageClass const var let
syntax keyword jsOperator delete instanceof typeof void new in
syntax match jsOperator /\(!\||\|&\|+\|-\|<\|>\|=\|%\|\/\|*\|\~\|\^\)/
syntax keyword jsBooleanTrue true
syntax keyword jsBooleanFalse false
"" JavaScript comments
syntax keyword jsCommentTodo TODO FIXME XXX TBD contained
syntax region jsLineComment start=+\/\/+ end=+$+ keepend contains=jsCommentTodo,@Spell
syntax region jsEnvComment start="\%^#!" end="$" display
syntax region jsLineComment start=+^\s*\/\/+ skip=+\n\s*\/\/+ end=+$+ keepend contains=jsCommentTodo,@Spell fold
syntax region jsCvsTag start="\$\cid:" end="\$" oneline contained
syntax region jsComment start="/\*" end="\*/" contains=jsCommentTodo,jsCvsTag,@Spell fold
"" JSDoc / JSDoc Toolkit
if !exists("javascript_ignore_javaScriptdoc")
syntax case ignore
"" syntax coloring for javadoc comments (HTML)
"syntax include @javaHtml <sfile>:p:h/html.vim
"unlet b:current_syntax
syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold
" tags containing a param
syntax match jsDocTags contained "@\(alias\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|memberOf\|mixes\|module\|name\|namespace\|requires\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite
" tags containing type and param
syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite
" tags containing type but no param
syntax match jsDocTags contained "@\(callback\|enum\|external\|this\|type\|typedef\|return\|returns\)\>" nextgroup=jsDocTypeNoParam skipwhite
" tags containing references
syntax match jsDocTags contained "@\(lends\|see\)\>" nextgroup=jsDocSeeTag skipwhite
" other tags (no extra syntax)
syntax match jsDocTags contained "@\(abstract\|access\|author\|classdesc\|constant\|const\|constructor\|copyright\|deprecated\|desc\|description\|event\|example\|fileOverview\|function\|global\|ignore\|inner\|instance\|license\|method\|mixin\|overview\|private\|protected\|public\|readonly\|since\|static\|todo\|summary\|undocumented\|virtual\)\>"
syntax region jsDocType start="{" end="}" oneline contained nextgroup=jsDocParam skipwhite
syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite
syntax region jsDocTypeNoParam start="{" end="}" oneline contained
syntax match jsDocTypeNoParam contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+"
syntax match jsDocParam contained "\%(#\|\"\|{\|}\|\w\|\.\|:\|\/\)\+"
syntax region jsDocSeeTag contained matchgroup=jsDocSeeTag start="{" end="}" contains=jsDocTags
syntax case match
endif "" JSDoc end
syntax case match
"" Syntax in the JavaScript code
syntax match jsFuncCall /\k\+\%(\s*(\)\@=/
syntax match jsSpecial "\v\\%(0|\\x\x\{2\}\|\\u\x\{4\}\|\c[A-Z]|.)"
syntax region jsStringD start=+"+ skip=+\\\\\|\\$"+ end=+"+ contains=jsSpecial,@htmlPreproc
syntax region jsStringS start=+'+ skip=+\\\\\|\\$'+ end=+'+ contains=jsSpecial,@htmlPreproc
syntax region jsRegexpCharClass start=+\[+ end=+\]+ contained
syntax match jsRegexpBoundary "\v%(\<@![\^$]|\\[bB])" contained
syntax match jsRegexpBackRef "\v\\[1-9][0-9]*" contained
syntax match jsRegexpQuantifier "\v\\@<!%([?*+]|\{\d+%(,|,\d+)?})\??" contained
syntax match jsRegexpOr "\v\<@!\|" contained
syntax match jsRegexpMod "\v\(@<=\?[:=!>]" contained
syntax cluster jsRegexpSpecial contains=jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod
syntax region jsRegexpGroup start="\\\@<!(" end="\\\@<!)" contained contains=jsRegexpCharClass,@jsRegexpSpecial keepend
syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\\\\|\\/+ end=+/[gimy]\{,4}+ contains=jsSpecial,jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline keepend
syntax match jsNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/
syntax keyword jsNumber Infinity
syntax match jsFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\=\d\+\)\=\>/
syntax match jsObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\)\@=/ contains=jsFunctionKey
syntax match jsFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\s*function\s*\)\@=/ contained
"" JavaScript Prototype
syntax keyword jsPrototype prototype
if g:javascript_conceal == 1
syntax keyword jsNull null conceal cchar=ø
syntax keyword jsThis this conceal cchar=@
syntax keyword jsReturn return conceal cchar=
syntax keyword jsUndefined undefined conceal cchar=¿
syntax keyword jsNan NaN conceal cchar=
else
syntax keyword jsNull null
syntax keyword jsThis this
syntax keyword jsReturn return
syntax keyword jsUndefined undefined
syntax keyword jsNan NaN
endif
"" Statement Keywords
syntax keyword jsStatement break continue with
syntax keyword jsConditional if else switch
syntax keyword jsRepeat do while for
syntax keyword jsLabel case default
syntax keyword jsKeyword yield
syntax keyword jsException try catch throw finally
syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object RegExp String Proxy ParallelArray ArrayBuffer DataView Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Intl JSON Math console document window
syntax match jsGlobalObjects /\%(Intl\.\)\@<=\(Collator\|DateTimeFormat\|NumberFormat\)/
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
syntax keyword jsBuiltins decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseInt uneval
syntax keyword jsFutureKeys abstract enum int short boolean 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
"" DOM/HTML/CSS specified things
" DOM2 Objects
syntax keyword jsGlobalObjects DOMImplementation DocumentFragment Document Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction
syntax keyword jsExceptions DOMException
" DOM2 CONSTANT
syntax keyword jsDomErrNo 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
syntax keyword jsDomNodeConsts 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
" HTML events and internal variables
syntax case ignore
syntax keyword jsHtmlEvents onblur onclick oncontextmenu ondblclick onfocus onkeydown onkeypress onkeyup onmousedown onmousemove onmouseout onmouseover onmouseup onresize
syntax case match
" Follow stuff should be highligh within a special context
" While it can't be handled with context depended with Regex based highlight
" So, turn it off by default
if exists("javascript_enable_domhtmlcss")
" DOM2 things
syntax match jsDomElemAttrs contained /\%(nodeName\|nodeValue\|nodeType\|parentNode\|childNodes\|firstChild\|lastChild\|previousSibling\|nextSibling\|attributes\|ownerDocument\|namespaceURI\|prefix\|localName\|tagName\)\>/
syntax match jsDomElemFuncs 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=jsParen skipwhite
" HTML things
syntax match jsHtmlElemAttrs contained /\%(className\|clientHeight\|clientLeft\|clientTop\|clientWidth\|dir\|id\|innerHTML\|lang\|length\|offsetHeight\|offsetLeft\|offsetParent\|offsetTop\|offsetWidth\|scrollHeight\|scrollLeft\|scrollTop\|scrollWidth\|style\|tabIndex\|title\)\>/
syntax match jsHtmlElemFuncs contained /\%(blur\|click\|focus\|scrollIntoView\|addEventListener\|dispatchEvent\|removeEventListener\|item\)\>/ nextgroup=jsParen skipwhite
" CSS Styles in JavaScript
syntax keyword jsCssStyles contained color font fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight letterSpacing lineBreak lineHeight quotes rubyAlign rubyOverhang rubyPosition
syntax keyword jsCssStyles contained textAlign textAlignLast textAutospace textDecoration textIndent textJustify textJustifyTrim textKashidaSpace textOverflowW6 textShadow textTransform textUnderlinePosition
syntax keyword jsCssStyles contained unicodeBidi whiteSpace wordBreak wordSpacing wordWrap writingMode
syntax keyword jsCssStyles contained bottom height left position right top width zIndex
syntax keyword jsCssStyles 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
syntax keyword jsCssStyles contained margin marginBottom marginLeft marginRight marginTop outline outlineColor outlineStyle outlineWidth padding paddingBottom paddingLeft paddingRight paddingTop
syntax keyword jsCssStyles contained listStyle listStyleImage listStylePosition listStyleType
syntax keyword jsCssStyles contained background backgroundAttachment backgroundColor backgroundImage gackgroundPosition backgroundPositionX backgroundPositionY backgroundRepeat
syntax keyword jsCssStyles contained clear clip clipBottom clipLeft clipRight clipTop content counterIncrement counterReset cssFloat cursor direction display filter layoutGrid layoutGridChar layoutGridLine layoutGridMode layoutGridType
syntax keyword jsCssStyles contained marks maxHeight maxWidth minHeight minWidth opacity MozOpacity overflow overflowX overflowY verticalAlign visibility zoom cssText
syntax keyword jsCssStyles contained scrollbar3dLightColor scrollbarArrowColor scrollbarBaseColor scrollbarDarkShadowColor scrollbarFaceColor scrollbarHighlightColor scrollbarShadowColor scrollbarTrackColor
" Highlight ways
syntax match jsDotNotation "\." nextgroup=jsPrototype,jsDomElemAttrs,jsDomElemFuncs,jsHtmlElemAttrs,jsHtmlElemFuncs
syntax match jsDotNotation "\.style\." nextgroup=jsCssStyles
endif "DOM/HTML/CSS
"" end DOM/HTML/CSS specified things
"" Code blocks
syntax cluster jsExpression contains=jsComment,jsLineComment,jsDocComment,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsBlock,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsStorageClass,jsPrototype,jsBuiltins,jsNoise
syntax cluster jsAll contains=@jsExpression,jsLabel,jsConditional,jsRepeat,jsReturn,jsStatement,jsTernaryIf,jsException
syntax region jsBracket matchgroup=jsBrackets start="\[" end="\]" contains=@jsAll,jsParensErrB,jsParensErrC,jsBracket,jsParen,jsBlock,@htmlPreproc fold
syntax region jsParen matchgroup=jsParens start="(" end=")" contains=@jsAll,jsParensErrA,jsParensErrC,jsParen,jsBracket,jsBlock,@htmlPreproc fold
syntax region jsBlock matchgroup=jsBraces start="{" end="}" contains=@jsAll,jsParensErrA,jsParensErrB,jsParen,jsBracket,jsBlock,jsObjectKey,@htmlPreproc fold
syntax region jsFuncBlock matchgroup=jsFuncBraces start="{" end="}" contains=@jsAll,jsParensErrA,jsParensErrB,jsParen,jsBracket,jsBlock,@htmlPreproc contained fold
syntax region jsTernaryIf matchgroup=jsTernaryIfOperator start=+?+ end=+:+ contains=@jsExpression,jsTernaryIf
"" catch errors caused by wrong parenthesis
syntax match jsParensError ")\|}\|\]"
syntax match jsParensErrA contained "\]"
syntax match jsParensErrB contained ")"
syntax match jsParensErrC contained "}"
if main_syntax == "javascript"
syntax sync clear
syntax sync ccomment jsComment minlines=200
syntax sync match jsHighlight grouphere jsBlock /{/
endif
if g:javascript_conceal == 1
syntax match jsFunction /\<function\>/ nextgroup=jsFuncName,jsFuncArgs skipwhite conceal cchar=ƒ
else
syntax match jsFunction /\<function\>/ nextgroup=jsFuncName,jsFuncArgs skipwhite
endif
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite
syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas nextgroup=jsFuncBlock keepend skipwhite skipempty
syntax match jsFuncArgCommas contained ','
syntax keyword jsArgsObj arguments contained containedin=jsFuncBlock
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_javascript_syn_inits")
if version < 508
let did_javascript_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink jsComment Comment
HiLink jsLineComment Comment
HiLink jsEnvComment PreProc
HiLink jsDocComment Comment
HiLink jsCommentTodo Todo
HiLink jsCvsTag Function
HiLink jsDocTags Special
HiLink jsDocSeeTag Function
HiLink jsDocType Type
HiLink jsDocTypeNoParam Type
HiLink jsDocParam Label
HiLink jsStringS String
HiLink jsStringD String
HiLink jsTernaryIfOperator Conditional
HiLink jsRegexpString String
HiLink jsRegexpBoundary SpecialChar
HiLink jsRegexpQuantifier SpecialChar
HiLink jsRegexpOr Conditional
HiLink jsRegexpMod SpecialChar
HiLink jsRegexpBackRef SpecialChar
HiLink jsRegexpGroup jsRegexpString
HiLink jsRegexpCharClass Character
HiLink jsCharacter Character
HiLink jsPrototype Special
HiLink jsConditional Conditional
HiLink jsBranch Conditional
HiLink jsLabel Label
HiLink jsReturn Statement
HiLink jsRepeat Repeat
HiLink jsStatement Statement
HiLink jsException Exception
HiLink jsKeyword Keyword
HiLink jsFunction Type
HiLink jsFuncName Function
HiLink jsArgsObj Special
HiLink jsError Error
HiLink jsParensError Error
HiLink jsParensErrA Error
HiLink jsParensErrB Error
HiLink jsParensErrC Error
HiLink jsOperator Operator
HiLink jsStorageClass StorageClass
HiLink jsThis Special
HiLink jsNan Number
HiLink jsNull Type
HiLink jsUndefined Type
HiLink jsNumber Number
HiLink jsFloat Float
HiLink jsBooleanTrue Boolean
HiLink jsBooleanFalse Boolean
HiLink jsNoise Noise
HiLink jsBrackets Noise
HiLink jsParens Noise
HiLink jsBraces Noise
HiLink jsFuncBraces Noise
HiLink jsFuncParens Noise
HiLink jsSpecial Special
HiLink jsGlobalObjects Special
HiLink jsExceptions Special
HiLink jsFutureKeys Special
HiLink jsBuiltins Special
HiLink jsDomErrNo Constant
HiLink jsDomNodeConsts Constant
HiLink jsDomElemAttrs Label
HiLink jsDomElemFuncs PreProc
HiLink jsHtmlEvents Special
HiLink jsHtmlElemAttrs Label
HiLink jsHtmlElemFuncs PreProc
HiLink jsCssStyles Label
delcommand HiLink
endif
" Define the htmlJavaScript for HTML syntax html.vim
"syntax clear htmlJavaScript
"syntax clear jsExpression
syntax cluster htmlJavaScript contains=@jsAll,jsBracket,jsParen,jsBlock
syntax cluster javaScriptExpression contains=@jsAll,jsBracket,jsParen,jsBlock,@htmlPreproc
" Vim's default html.vim highlights all javascript as 'Special'
hi! def link javaScript NONE
let b:current_syntax = "javascript"
if main_syntax == 'javascript'
unlet main_syntax
endif

3
.vim/syntax/python.vim Normal file
View File

@@ -0,0 +1,3 @@
syn keyword Bool True False
hi def link Bool Keyword

112
.vim/syntax/sal.vim Normal file
View File

@@ -0,0 +1,112 @@
" Vim syntax file
" Language: Symbolic Analysis Library (SAL)
" http://sal.csl.sri.com/
" Maintainer: Brandon Borkholder
" Filenames: *.sal
" Last Change: 08 March 2007
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" By convention, keywords are uppercase, but SAL seems to allow both cases
syn case match
" SAL keywords
syn keyword SALbasicType NATURAL REAL BOOLEAN NZINTEGER INTEGER NZREAL
syn keyword SALtypeKeyword TYPE DATATYPE END STATE
syn keyword SALarrayExpr ARRAY OF
syn keyword SALconditional IF THEN ELSIF ELSE ENDIF
syn keyword SALquantifier FORALL EXISTS
syn keyword SALupdateExpr WITH
syn keyword SALlambdaExpr LAMBDA
syn keyword SALletExpr LET
syn keyword SALinExpr IN
syn keyword SALlogicalOp AND OR NOT XOR
syn keyword SALarithmeticOp DIV MOD
syn keyword SALbaseModule MODULE BEGIN END
syn keyword SALmoduleDecl INPUT OUTPUT GLOBAL LOCAL DEFINITION INITIALIZATION TRANSITION
syn keyword SALmoduleOp RENAME OBSERVE
syn keyword SALcontext CONTEXT
syn keyword SALassertion OBLIGATION CLAIM LEMMA THEOREM
syn keyword SALconstant TRUE FALSE
syn keyword SALtemporalOp AX AG AF EX EG EF X G F
syn cluster SALtype add=SALbasicType,SALrangeType,SALrecordType,SALsetType,SALfunctionType,SALconstant,SALnumber
syn cluster SALexpression add=SALlogicalOp,SALarithmeticOp,SALarithmetic,@SALtype,SALrelation,SALarrayExpr,SALquantifier
syn cluster SALrange add=SALrangeType,SALrangeDelimiter
" A TODO setting is always in every syntax file
syn keyword SALTodo contained TODO FIXME XXX
" SAL comments
syn region SALcomment start=/%/ end=/$/ contains=SALTodo
" SAL structures and types
syn region SALrecordType start=/\[#/ end=/#\]/ contains=@SALtype
syn region SALrangeType start=/\[[^#].*\.\./ end=/[^#]\]/ contains=@SALexpression
syn region SALfunctionType start=/\[[^#].*->/ end=/[^#]\]/ contains=@SALtype
syn region SALsetType start=/{/ end=/}/ contains=@SALexpression
syn region SALrecordLiteral start=/(#/ end=/#)/
" SAL operators and relations
syn match SALrelation /\(=\|\/=\|=>\|<\|[^-]>\|<=\|>=\)/
syn match SALmoduleCompos /||\|\[\]/
syn match SALtransition /\(:=\|-->\)/
" Numbers
syn match SALnumber /\<\d*\>/
" Arithmetic operations
syn match SALarithmetic /\(*\|+\|\/[^=]\|-[^->]\)/
" next' variables
syn match SALnextVariable /\<\w\+\>'/
" Theorem declarations
syn match SALtheoremDeclaration /\w\+ *: *\(OBLIGATION\|CLAIM\|THEOREM\|LEMMA\)/ contains=theoremName,assertion
syn match SALtheoremName /\w\+/ contained nextgroup=assertion
" Define new highlight groups
hi SALRelationSyntax guifg=Red ctermfg=Red
" Now set the colors
hi link SALbasicType Type
hi link SALarrayExpr Type
hi link SALtypeKeyword Define
hi link SALconditional Conditional
hi link SALquantifier Keyword
hi link SALupdateExpr Keyword
hi link SALlambdaExpr Macro
hi link SALletExpr Keyword
hi link SALinExpr Keyword
hi link SALlogicalOp Operator
hi link SALarithmeticOp Operator
hi link SALbaseModule Define
hi link SALmoduleDecl Define
hi link SALmoduleOp Operator
hi link SALcontext Define
hi link SALassertion Underlined
hi link SALconstant Boolean
hi link SALtemporalOp Operator
hi link SALcomment Comment
hi link SALrecordType Structure
hi link SALrangeType Constant
hi link SALfunctionType Function
hi link SALsetType Constant
hi link SALrecordLiteral Constant
hi link SALrelation Statement
hi link SALmoduleCompos Operator
hi link SALtransition SALRelationSyntax
hi link SALnumber Number
hi link SALnextVariable Identifier
hi link SALtheoremDeclaration Underlined
hi link SALtheoremName Underlined
" Set the current syntax
let b:current_syntax = "sal"

148
.vim/syntax/setty.vim Normal file
View File

@@ -0,0 +1,148 @@
" Vim syntax file
" Language: Setty
" Maintainer: Adam Blank <adamblan@cs.cmu.edu>
" Last Change: 2013 Jun 17
" Credits: This is based on setty.vim by
" Zvezdan Petkovic <zpetkovic@acm.org>
" Neil Schemenauer <nas@setty.ca>
" Dmitry Vasiliev
"
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" Keep setty keywords in alphabetical order inside groups for easy
" comparison with the table in the 'setty Language Reference'
"
syn keyword settyStatement T, F
syn keyword settyStatement print printx
syn keyword settyStatement return requires recurse
syn keyword settyConditional else if
syn keyword settyRepeat for
syn keyword settyOperator and in not or union intersect minus
syn keyword settyInclude use
" The zero-length non-grouping match before the function name is
" extremely important in settyFunction. Without it, everything is
" interpreted as a function inside the contained environment of
" doctests.
syn match settyFunction
\ "\%(\%(def\s\|class\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*" contained
syn match settyComment "#.*$" contains=settyTodo,@Spell
syn keyword settyTodo FIXME NOTE NOTES TODO XXX contained
" Triple-quoted strings can contain doctests.
syn region settyString
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=settyEscape,@Spell
syn region settyString
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
\ contains=settyEscape,settySpaceError,settyDoctest,@Spell
syn region settyRawString
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=@Spell
syn region settyRawString
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
\ contains=settySpaceError,settyDoctest,@Spell
syn match settyEscape +\\[abfnrtv'"\\]+ contained
syn match settyEscape "\\\o\{1,3}" contained
syn match settyEscape "\\x\x\{2}" contained
syn match settyEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" setty allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
syn match settyEscape "\\N{\a\+\%(\s\a\+\)*}" contained
syn match settyEscape "\\$"
if exists("setty_highlight_all")
if exists("setty_no_builtin_highlight")
unlet setty_no_builtin_highlight
endif
if exists("setty_no_number_highlight")
unlet setty_no_number_highlight
endif
let setty_space_error_highlight = 1
endif
" It is very important to understand all details before changing the
" regular expressions below or their order.
" The word boundaries are *not* the floating-point number boundaries
" because of a possible leading or trailing decimal point.
" The expressions below ensure that all valid number literals are
" highlighted, and invalid number literals are not. For example,
"
" - a decimal point in '4.' at the end of a line is highlighted,
" - a second dot in 1.0.0 is not highlighted,
" - 08 is not highlighted,
" - 08e0 or 08j are highlighted,
"
" and so on, as specified in the 'setty Language Reference'.
if !exists("setty_no_number_highlight")
" numbers (including longs and complex)
syn match settyNumber "\<\%([1-9]\d*\|0\)\=\>"
endif
" Group the built-ins in the order in the 'setty Library Reference' for
" easier comparison.
" http://docs.setty.org/library/constants.html
" http://docs.setty.org/library/functions.html
" http://docs.setty.org/library/functions.html#non-essential-built-in-functions
" setty built-in functions are in alphabetical order.
if !exists("setty_no_builtin_highlight")
" built-in constants
syn keyword settyBuiltin F T
" built-in functions
syn keyword settyBuiltin pi1 pi2 cardinality lt leq gt geq implies iff unimplemented
endif
if exists("setty_space_error_highlight")
" trailing whitespace
syn match settySpaceError display excludenl "\s\+$"
" mixed tabs and spaces
syn match settySpaceError display " \+\t"
syn match settySpaceError display "\t\+ "
endif
if version >= 508 || !exists("did_setty_syn_inits")
if version <= 508
let did_setty_syn_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
" The default highlight links. Can be overridden later.
HiLink settyStatement Statement
HiLink settyConditional Conditional
HiLink settyRepeat Repeat
HiLink settyOperator Operator
HiLink settyInclude Include
HiLink settyDecorator Define
HiLink settyFunction Function
HiLink settyComment Comment
HiLink settyTodo Todo
HiLink settyString String
HiLink settyRawString String
HiLink settyEscape Special
if !exists("setty_no_number_highlight")
HiLink settyNumber Number
endif
if !exists("setty_no_builtin_highlight")
HiLink settyBuiltin Function
endif
if exists("setty_space_error_highlight")
HiLink settySpaceError Error
endif
if !exists("setty_no_doctest_highlight")
HiLink settyDoctest Special
HiLink settyDoctestValue Define
endif
delcommand HiLink
endif
let b:current_syntax = "setty"
" vim:set sw=2 sts=2 ts=8 noet: