aboutsummaryrefslogtreecommitdiff
path: root/vim/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'vim/syntax')
-rwxr-xr-xvim/syntax/coffee.vim236
-rwxr-xr-xvim/syntax/eco.vim62
-rw-r--r--vim/syntax/scala.vim151
3 files changed, 0 insertions, 449 deletions
diff --git a/vim/syntax/coffee.vim b/vim/syntax/coffee.vim
deleted file mode 100755
index c324435..0000000
--- a/vim/syntax/coffee.vim
+++ /dev/null
@@ -1,236 +0,0 @@
-" Language: CoffeeScript
-" Maintainer: Mick Koch <kchmck@gmail.com>
-" URL: http://github.com/kchmck/vim-coffee-script
-" License: WTFPL
-
-" Bail if our syntax is already loaded.
-if exists('b:current_syntax') && b:current_syntax == 'coffee'
- finish
-endif
-
-" Include JavaScript for coffeeEmbed.
-syn include @coffeeJS syntax/javascript.vim
-
-" Highlight long strings.
-syn sync minlines=100
-
-" CoffeeScript identifiers can have dollar signs.
-setlocal isident+=$
-
-" These are `matches` instead of `keywords` because vim's highlighting
-" priority for keywords is higher than matches. This causes keywords to be
-" highlighted inside matches, even if a match says it shouldn't contain them --
-" like with coffeeAssign and coffeeDot.
-syn match coffeeStatement /\<\%(return\|break\|continue\|throw\)\>/ display
-hi def link coffeeStatement Statement
-
-syn match coffeeRepeat /\<\%(for\|while\|until\|loop\)\>/ display
-hi def link coffeeRepeat Repeat
-
-syn match coffeeConditional /\<\%(if\|else\|unless\|switch\|when\|then\)\>/
-\ display
-hi def link coffeeConditional Conditional
-
-syn match coffeeException /\<\%(try\|catch\|finally\)\>/ display
-hi def link coffeeException Exception
-
-syn match coffeeKeyword /\<\%(new\|in\|of\|by\|and\|or\|not\|is\|isnt\|class\|extends\|super\|do\)\>/
-\ display
-" The `own` keyword is only a keyword after `for`.
-syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat
-\ display
-hi def link coffeeKeyword Keyword
-
-syn match coffeeOperator /\<\%(instanceof\|typeof\|delete\)\>/ display
-hi def link coffeeOperator Operator
-
-" The first case matches symbol operators only if they have an operand before.
-syn match coffeeExtendedOp /\%(\S\s*\)\@<=[+\-*/%&|\^=!<>?.]\+\|[-=]>\|--\|++\|::/
-\ display
-syn match coffeeExtendedOp /\%(and\|or\)=/ display
-hi def link coffeeExtendedOp coffeeOperator
-
-" This is separate from `coffeeExtendedOp` to help differentiate commas from
-" dots.
-syn match coffeeSpecialOp /[,;]/ display
-hi def link coffeeSpecialOp SpecialChar
-
-syn match coffeeBoolean /\<\%(true\|on\|yes\|false\|off\|no\)\>/ display
-hi def link coffeeBoolean Boolean
-
-syn match coffeeGlobal /\<\%(null\|undefined\)\>/ display
-hi def link coffeeGlobal Type
-
-" A special variable
-syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display
-" An @-variable
-syn match coffeeSpecialVar /@\%(\I\i*\)\?/ display
-hi def link coffeeSpecialVar Special
-
-" A class-like name that starts with a capital letter
-syn match coffeeObject /\<\u\w*\>/ display
-hi def link coffeeObject Structure
-
-" A constant-like name in SCREAMING_CAPS
-syn match coffeeConstant /\<\u[A-Z0-9_]\+\>/ display
-hi def link coffeeConstant Constant
-
-" A variable name
-syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeObject,
-\ coffeeConstant
-
-" A non-interpolated string
-syn cluster coffeeBasicString contains=@Spell,coffeeEscape
-" An interpolated string
-syn cluster coffeeInterpString contains=@coffeeBasicString,coffeeInterp
-
-" Regular strings
-syn region coffeeString start=/"/ skip=/\\\\\|\\"/ end=/"/
-\ contains=@coffeeInterpString
-syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/
-\ contains=@coffeeBasicString
-hi def link coffeeString String
-
-" A integer, including a leading plus or minus
-syn match coffeeNumber /\i\@<![-+]\?\d\+\%([eE][+-]\?\d\+\)\?/ display
-" A hex number
-syn match coffeeNumber /\<0[xX]\x\+\>/ display
-hi def link coffeeNumber Number
-
-" A floating-point number, including a leading plus or minus
-syn match coffeeFloat /\i\@<![-+]\?\d*\.\@<!\.\d\+\%([eE][+-]\?\d\+\)\?/
-\ display
-hi def link coffeeFloat Float
-
-" An error for reserved keywords
-if !exists("coffee_no_reserved_words_error")
- syn match coffeeReservedError /\<\%(case\|default\|function\|var\|void\|with\|const\|let\|enum\|export\|import\|native\|__hasProp\|__extends\|__slice\|__bind\|__indexOf\)\>/
- \ display
- hi def link coffeeReservedError Error
-endif
-
-" This is separate from `coffeeExtendedOp` since assignments require it.
-syn match coffeeAssignOp /:/ contained display
-hi def link coffeeAssignOp coffeeOperator
-
-" Strings used in string assignments, which can't have interpolations
-syn region coffeeAssignString start=/"/ skip=/\\\\\|\\"/ end=/"/ contained
-\ contains=@coffeeBasicString
-syn region coffeeAssignString start=/'/ skip=/\\\\\|\\'/ end=/'/ contained
-\ contains=@coffeeBasicString
-hi def link coffeeAssignString String
-
-" A normal object assignment
-syn match coffeeObjAssign /@\?\I\i*\s*:\@<!::\@!/
-\ contains=@coffeeIdentifier,coffeeAssignOp
-hi def link coffeeObjAssign Identifier
-
-" An object-string assignment
-syn match coffeeObjStringAssign /\("\|'\)[^\1]*\1\s*;\@<!::\@!'\@!/
-\ contains=coffeeAssignString,coffeeAssignOp
-" An object-integer assignment
-syn match coffeeObjNumberAssign /\d\+\%(\.\d\+\)\?\s*:\@<!::\@!/
-\ contains=coffeeNumber,coffeeAssignOp
-
-syn keyword coffeeTodo TODO FIXME XXX contained
-hi def link coffeeTodo Todo
-
-syn match coffeeComment /#.*/ contains=@Spell,coffeeTodo
-hi def link coffeeComment Comment
-
-syn region coffeeBlockComment start=/####\@!/ end=/###/
-\ contains=@Spell,coffeeTodo
-hi def link coffeeBlockComment coffeeComment
-
-" A comment in a heregex
-syn region coffeeHeregexComment start=/#/ end=/\ze\/\/\/\|$/ contained
-\ contains=@Spell,coffeeTodo
-hi def link coffeeHeregexComment coffeeComment
-
-" Embedded JavaScript
-syn region coffeeEmbed matchgroup=coffeeEmbedDelim
-\ start=/`/ skip=/\\\\\|\\`/ end=/`/
-\ contains=@coffeeJS
-hi def link coffeeEmbedDelim Delimiter
-
-syn region coffeeInterp matchgroup=coffeeInterpDelim start=/#{/ end=/}/ contained
-\ contains=@coffeeAll
-hi def link coffeeInterpDelim PreProc
-
-" A string escape sequence
-syn match coffeeEscape /\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}\|\\./ contained display
-hi def link coffeeEscape SpecialChar
-
-" A regex -- must not follow a parenthesis, number, or identifier, and must not
-" be followed by a number
-syn region coffeeRegex start=/\%(\%()\|\i\@<!\d\)\s*\|\i\)\@<!\/=\@!\s\@!/
-\ skip=/\[[^\]]\{-}\/[^\]]\{-}\]/
-\ end=/\/[gimy]\{,4}\d\@!/
-\ oneline contains=@coffeeBasicString
-hi def link coffeeRegex String
-
-" A heregex
-syn region coffeeHeregex start=/\/\/\// end=/\/\/\/[gimy]\{,4}/
-\ contains=@coffeeInterpString,coffeeHeregexComment
-\ fold
-hi def link coffeeHeregex coffeeRegex
-
-" Heredoc strings
-syn region coffeeHeredoc start=/"""/ end=/"""/ contains=@coffeeInterpString
-\ fold
-syn region coffeeHeredoc start=/'''/ end=/'''/ contains=@coffeeBasicString
-\ fold
-hi def link coffeeHeredoc String
-
-" An error for trailing whitespace, as long as the line isn't just whitespace
-if !exists("coffee_no_trailing_space_error")
- syn match coffeeSpaceError /\S\@<=\s\+$/ display
- hi def link coffeeSpaceError Error
-endif
-
-" An error for trailing semicolons, for help transitioning from JavaScript
-if !exists("coffee_no_trailing_semicolon_error")
- syn match coffeeSemicolonError /;$/ display
- hi def link coffeeSemicolonError Error
-endif
-
-" Ignore reserved words in dot accesses.
-syn match coffeeDotAccess /\.\@<!\.\s*\I\i*/he=s+1 contains=@coffeeIdentifier
-hi def link coffeeDotAccess coffeeExtendedOp
-
-" Ignore reserved words in prototype accesses.
-syn match coffeeProtoAccess /::\s*\I\i*/he=s+2 contains=@coffeeIdentifier
-hi def link coffeeProtoAccess coffeeExtendedOp
-
-" This is required for interpolations to work.
-syn region coffeeCurlies matchgroup=coffeeCurly start=/{/ end=/}/
-\ contains=@coffeeAll
-syn region coffeeBrackets matchgroup=coffeeBracket start=/\[/ end=/\]/
-\ contains=@coffeeAll
-syn region coffeeParens matchgroup=coffeeParen start=/(/ end=/)/
-\ contains=@coffeeAll
-
-" These are highlighted the same as commas since they tend to go together.
-hi def link coffeeBlock coffeeSpecialOp
-hi def link coffeeBracket coffeeBlock
-hi def link coffeeCurly coffeeBlock
-hi def link coffeeParen coffeeBlock
-
-" This is used instead of TOP to keep things coffee-specific for good
-" embedding. `contained` groups aren't included.
-syn cluster coffeeAll contains=coffeeStatement,coffeeRepeat,coffeeConditional,
-\ coffeeException,coffeeKeyword,coffeeOperator,
-\ coffeeExtendedOp,coffeeSpecialOp,coffeeBoolean,
-\ coffeeGlobal,coffeeSpecialVar,coffeeObject,
-\ coffeeConstant,coffeeString,coffeeNumber,
-\ coffeeFloat,coffeeReservedError,coffeeObjAssign,
-\ coffeeObjStringAssign,coffeeObjNumberAssign,
-\ coffeeComment,coffeeBlockComment,coffeeEmbed,
-\ coffeeRegex,coffeeHeregex,coffeeHeredoc,
-\ coffeeSpaceError,coffeeSemicolonError,
-\ coffeeDotAccess,coffeeProtoAccess,
-\ coffeeCurlies,coffeeBrackets,coffeeParens
-
-if !exists('b:current_syntax')
- let b:current_syntax = 'coffee'
-endif
diff --git a/vim/syntax/eco.vim b/vim/syntax/eco.vim
deleted file mode 100755
index 485b356..0000000
--- a/vim/syntax/eco.vim
+++ /dev/null
@@ -1,62 +0,0 @@
-" Vim syntax file
-" Language: eco
-" Maintainer: Jay Adkisson
-" Mostly stolen from eruby.vim
-
-if !exists("g:eco_default_subtype")
- let g:eco_default_subtype = "html"
-endif
-
-if !exists("b:eco_subtype")
- let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
- let b:eco_subtype = matchstr(s:lines,'eco_subtype=\zs\w\+')
- if b:eco_subtype == ''
- let b:eco_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.eco\)\+$','',''),'\.\zs\w\+$')
- endif
- if b:eco_subtype == 'rhtml'
- let b:eco_subtype = 'html'
- elseif b:eco_subtype == 'jst'
- let b:eco_subtype = 'html'
- elseif b:eco_subtype == 'rb'
- let b:eco_subtype = 'ruby'
- elseif b:eco_subtype == 'yml'
- let b:eco_subtype = 'yaml'
- elseif b:eco_subtype == 'js' || b:eco_subtype == 'json'
- let b:eco_subtype = 'javascript'
- elseif b:eco_subtype == 'txt'
- " Conventional; not a real file type
- let b:eco_subtype = 'text'
- elseif b:eco_subtype == ''
- if exists('b:current_syntax') && b:current_syntax != ''
- let b:eco_subtype = b:current_syntax
- else
- let b:eco_subtype = g:eco_default_subtype
- endif
- endif
-endif
-
-if exists("b:eco_subtype") && b:eco_subtype != '' && b:eco_subtype != 'eco'
- exec "runtime! syntax/".b:eco_subtype.".vim"
- syn include @coffeeTop syntax/coffee.vim
-endif
-
-syn cluster ecoRegions contains=ecoBlock,ecoExpression,ecoComment
-
-syn region ecoBlock matchgroup=ecoDelimiter start=/<%/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend
-syn region ecoExpression matchgroup=ecoDelimiter start=/<%[=\-]/ end=/%>/ contains=@coffeeTop containedin=ALLBUT,@ecoRegions keepend
-syn region ecoComment matchgroup=ecoComment start=/<%#/ end=/%>/ contains=@coffeeTodo,@Spell containedin=ALLBUT,@ecoRegions keepend
-
-" eco features not in coffeescript proper
-syn keyword ecoEnd end containedin=@ecoRegions
-syn match ecoIndentColon /\s+\w+:/ containedin=@ecoRegions
-
-" Define the default highlighting.
-
-hi def link ecoDelimiter Delimiter
-hi def link ecoComment Comment
-hi def link ecoEnd coffeeConditional
-hi def link ecoIndentColon None
-
-let b:current_syntax = 'eco'
-
-" vim: nowrap sw=2 sts=2 ts=8:
diff --git a/vim/syntax/scala.vim b/vim/syntax/scala.vim
deleted file mode 100644
index 36605ab..0000000
--- a/vim/syntax/scala.vim
+++ /dev/null
@@ -1,151 +0,0 @@
-" Vim syntax file
-" Language : Scala (http://scala-lang.org/)
-" Maintainers: Stefan Matthias Aust, Julien Wetterwald
-" Last Change: 2007 June 13
-
-if version < 600
- syntax clear
-elseif exists("b:current_syntax")
- finish
-endif
-
-syn case match
-syn sync minlines=50
-
-" most Scala keywords
-syn keyword scalaKeyword abstract case catch do else extends final finally for forSome if implicit lazy match new null override private protected requires return sealed super this throw try type while with yield
-syn match scalaKeyword "=>"
-syn match scalaKeyword "<-"
-syn match scalaKeyword "\<_\>"
-
-syn match scalaOperator ":\{2,\}" "this is not a type
-
-" package and import statements
-syn keyword scalaPackage package nextgroup=scalaFqn skipwhite
-syn keyword scalaImport import nextgroup=scalaFqn skipwhite
-syn match scalaFqn "\<[._$a-zA-Z0-9,]*" contained nextgroup=scalaFqnSet
-syn region scalaFqnSet start="{" end="}" contained
-
-" boolean literals
-syn keyword scalaBoolean true false
-
-" definitions
-syn keyword scalaDef def nextgroup=scalaDefName skipwhite
-syn keyword scalaVal val nextgroup=scalaValName skipwhite
-syn keyword scalaVar var nextgroup=scalaVarName skipwhite
-syn keyword scalaClass class nextgroup=scalaClassName skipwhite
-syn keyword scalaObject object nextgroup=scalaClassName skipwhite
-syn keyword scalaTrait trait nextgroup=scalaClassName skipwhite
-syn match scalaDefName "[^ =:;([]\+" contained nextgroup=scalaDefSpecializer skipwhite
-syn match scalaValName "[^ =:;([]\+" contained
-syn match scalaVarName "[^ =:;([]\+" contained
-syn match scalaClassName "[^ =:;(\[]\+" contained nextgroup=scalaClassSpecializer skipwhite
-syn region scalaDefSpecializer start="\[" end="\]" contained contains=scalaDefSpecializer
-syn region scalaClassSpecializer start="\[" end="\]" contained contains=scalaClassSpecializer
-
-" type constructor (actually anything with an uppercase letter)
-syn match scalaConstructor "\<[A-Z][_$a-zA-Z0-9]*\>" nextgroup=scalaConstructorSpecializer
-syn region scalaConstructorSpecializer start="\[" end="\]" contained contains=scalaConstructorSpecializer
-
-" method call
-syn match scalaRoot "\<[a-zA-Z][_$a-zA-Z0-9]*\."me=e-1
-syn match scalaMethodCall "\.[a-z][_$a-zA-Z0-9]*"ms=s+1
-
-" type declarations in val/var/def
-syn match scalaType ":\s*\(=>\s*\)\?[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)\?\(\s*\(<:\|>:\|#\|=>\)\s*[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)*\)*"ms=s+1
-
-" comments
-syn match scalaTodo "[tT][oO][dD][oO]" contained
-syn match scalaLineComment "//.*" contains=scalaTodo
-syn region scalaComment start="/\*" end="\*/" contains=scalaTodo
-syn case ignore
-syn include @scalaHtml syntax/html.vim
-unlet b:current_syntax
-syn case match
-syn region scalaDocComment start="/\*\*" end="\*/" contains=scalaDocTags,scalaTodo,@scalaHtml keepend
-syn region scalaDocTags start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" contained
-syn match scalaDocTags "@[a-z]\+" contained
-
-syn match scalaEmptyString "\"\""
-
-" multi-line string literals
-syn region scalaMultiLineString start="\"\"\"" end="\"\"\"" contains=scalaUnicode
-syn match scalaUnicode "\\u[0-9a-fA-F]\{4}" contained
-
-" string literals with escapes
-syn region scalaString start="\"[^"]" skip="\\\"" end="\"" contains=scalaStringEscape " TODO end \n or not?
-syn match scalaStringEscape "\\u[0-9a-fA-F]\{4}" contained
-syn match scalaStringEscape "\\[nrfvb\\\"]" contained
-
-" symbol and character literals
-syn match scalaSymbol "'[_a-zA-Z0-9][_a-zA-Z0-9]*\>"
-syn match scalaChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
-
-" number literals
-syn match scalaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
-syn match scalaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
-syn match scalaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
-syn match scalaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
-
-" xml literals
-syn match scalaXmlTag "<[a-zA-Z]\_[^>]*/>" contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString
-syn region scalaXmlString start="\"" end="\"" contained
-syn match scalaXmlStart "<[a-zA-Z]\_[^>]*>" contained contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString
-syn region scalaXml start="<\([a-zA-Z]\_[^>]*\_[^/]\|[a-zA-Z]\)>" matchgroup=scalaXmlStart end="</\_[^>]\+>" contains=scalaXmlEscape,scalaXmlQuote,scalaXml,scalaXmlStart,scalaXmlComment
-syn region scalaXmlEscape matchgroup=scalaXmlEscapeSpecial start="{" matchgroup=scalaXmlEscapeSpecial end="}" contained contains=TOP
-syn match scalaXmlQuote "&[^;]\+;" contained
-syn match scalaXmlComment "<!--\_[^>]*-->" contained
-
-syn sync fromstart
-
-" map Scala groups to standard groups
-hi link scalaKeyword Keyword
-hi link scalaPackage Include
-hi link scalaImport Include
-hi link scalaBoolean Boolean
-hi link scalaOperator Normal
-hi link scalaNumber Number
-hi link scalaEmptyString String
-hi link scalaString String
-hi link scalaChar String
-hi link scalaMultiLineString String
-hi link scalaStringEscape Special
-hi link scalaSymbol Special
-hi link scalaUnicode Special
-hi link scalaComment Comment
-hi link scalaLineComment Comment
-hi link scalaDocComment Comment
-hi link scalaDocTags Special
-hi link scalaTodo Todo
-hi link scalaType Type
-hi link scalaTypeSpecializer scalaType
-hi link scalaXml String
-hi link scalaXmlTag Include
-hi link scalaXmlString String
-hi link scalaXmlStart Include
-hi link scalaXmlEscape Normal
-hi link scalaXmlEscapeSpecial Special
-hi link scalaXmlQuote Special
-hi link scalaXmlComment Comment
-hi link scalaDef Keyword
-hi link scalaVar Keyword
-hi link scalaVal Keyword
-hi link scalaClass Keyword
-hi link scalaObject Keyword
-hi link scalaTrait Keyword
-hi link scalaDefName Function
-hi link scalaDefSpecializer Function
-hi link scalaClassName Special
-hi link scalaClassSpecializer Special
-hi link scalaConstructor Special
-hi link scalaConstructorSpecializer scalaConstructor
-
-let b:current_syntax = "scala"
-
-" you might like to put these lines in your .vimrc
-"
-" customize colors a little bit (should be a different file)
-" hi scalaNew gui=underline
-" hi scalaMethodCall gui=italic
-" hi scalaValName gui=underline
-" hi scalaVarName gui=underline