# HG changeset patch # User edogawaconan # Date 1395038835 -32400 # Node ID bbcffc594d1e022cd774f5fb720a966a72f8bb7d # Parent 973b7f21b582f2620fe66a5cc17956834776e5fe Vendor what should be vendored and add some more. diff -r 973b7f21b582 -r bbcffc594d1e rc/vim-syntax-coffee --- a/rc/vim-syntax-coffee Mon Mar 17 11:30:05 2014 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,221 +0,0 @@ -" Language: CoffeeScript -" Maintainer: Mick Koch -" 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 /\/ 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*\)\@<=[+\-*/%&|\^=!<>?.]\{-1,}\|[-=]>\|--\|++\|:/ -\ 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 -hi def link coffeeSpecialVar Special - -" An @-variable -syn match coffeeSpecialIdent /@\%(\I\i*\)\?/ display -hi def link coffeeSpecialIdent Identifier - -" 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,coffeeSpecialIdent, -\ 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\@/ display -syn match coffeeNumber /\<0[bB][01]\+\>/ display -syn match coffeeNumber /\<0[oO][0-7]\+\>/ display -hi def link coffeeNumber Number - -" A floating-point number, including a leading plus or minus -syn match coffeeFloat /\i\@/ - \ display - hi def link coffeeReservedError Error -endif - -" A normal object assignment -syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display -hi def link coffeeObjAssign Identifier - -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\@ -" Last Change: 2013-02-01 -" Version: 0.12 - -if !exists("main_syntax") - if version < 600 - syntax clear - elseif exists("b:current_syntax") - finish - endif - let main_syntax = 'json' -endif - -" NOTE that for the concealing to work your conceallevel should be set to 2 - -" Syntax: Strings -if has('conceal') - syn region jsonString oneline matchgroup=Quote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape -else - syn region jsonString oneline matchgroup=Quote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape -endif - -" Syntax: JSON does not allow strings with single quotes, unlike JavaScript. -syn region jsonStringSQ oneline start=+'+ skip=+\\\\\|\\"+ end=+'+ - -" Syntax: JSON Keywords -" Separated into a match and region because a region by itself is always greedy -syn match jsonKeywordMatch /"[^\"\:]\+"\:/ contains=jsonKeywordRegion -if has('conceal') - syn region jsonKeywordRegion matchgroup=Quote start=/"/ end=/"\ze\:/ concealends contained -else - syn region jsonKeywordRegion matchgroup=Quote start=/"/ end=/"\ze\:/ contained -endif - -" Syntax: Escape sequences -syn match jsonEscape "\\["\\/bfnrt]" contained -syn match jsonEscape "\\u\x\{4}" contained - -" Syntax: Strings should always be enclosed with quotes. -syn match jsonNoQuotes "\<\w\+\>" - -" Syntax: Numbers -syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" - -" ERROR WARNINGS ********************************************** -" -" Syntax: An integer part of 0 followed by other digits is not allowed. -syn match jsonNumError "-\=\<0\d\.\d*\>" - -" Syntax: Decimals smaller than one should begin with 0 (so .1 should be 0.1). -syn match jsonNumError "\:\@<=\s*\zs\.\d\+" - -" Syntax: No comments in JSON, see http://stackoverflow.com/questions/244777/can-i-comment-a-json-file -syn match jsonCommentError "//.*" -syn match jsonCommentError "\(/\*\)\|\(\*/\)" - -" Syntax: No semicolons in JSON -syn match jsonSemicolonError ";" - -" Syntax: No trailing comma after the last element of arrays or objects -syn match jsonCommaError ",\_s*[}\]]" - -" ********************************************** END OF ERROR WARNINGS - -" Syntax: Boolean -syn keyword jsonBoolean true false - -" Syntax: Null -syn keyword jsonNull null - -" Syntax: Braces -syn region jsonFold matchgroup=jsonBraces start="{" end="}" transparent fold -syn region jsonFold matchgroup=jsonBraces start="\[" end="]" transparent fold - -" 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_json_syn_inits") - if version < 508 - let did_json_syn_inits = 1 - command -nargs=+ HiLink hi link - else - command -nargs=+ HiLink hi def link - endif - HiLink jsonString String - HiLink jsonEscape Special - HiLink jsonNumber Number - HiLink jsonBraces Operator - HiLink jsonNull Function - HiLink jsonBoolean Boolean - HiLink jsonKeywordRegion Label - - HiLink jsonNumError Error - HiLink jsonCommentError Error - HiLink jsonSemicolonError Error - HiLink jsonCommaError Error - HiLink jsonStringSQ Error - HiLink jsonNoQuotes Error - delcommand HiLink -endif - -let b:current_syntax = "json" -if main_syntax == 'json' - unlet main_syntax -endif - -" Vim settings -" vim: ts=8 fdm=marker - -" MIT License -" Copyright (c) 2013, Jeroen Ruigrok van der Werven, Eli Parra -"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -"THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -"See https://twitter.com/elzr/status/294964017926119424 diff -r 973b7f21b582 -r bbcffc594d1e rc/vim-syntax-scss --- a/rc/vim-syntax-scss Mon Mar 17 11:30:05 2014 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -" Vim syntax file -" Language: SCSS (Sassy CSS) -" Author: Daniel Hofstetter (daniel.hofstetter@42dh.com) -" Inspired by the syntax files for sass and css. Thanks to the authors of -" those files! - -if exists("b:current_syntax") - finish -endif - -runtime! syntax/css.vim - -syn case ignore - -syn region scssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssUrl,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,scssDefinition,scssComment,scssIdChar,scssClassChar,scssAmpersand,scssVariable,scssInclude,scssExtend,scssDebug,scssWarn,@scssControl,scssInterpolation,scssNestedSelector,scssReturn - -syn region scssInterpolation start="#{" end="}" contains=scssVariable - -syn match scssVariable "$[[:alnum:]_-]\+" nextgroup=scssVariableAssignment -syn match scssVariableAssignment ":" contained nextgroup=scssVariableValue -syn match scssVariableValue ".*;"me=e-1 contained contains=scssVariable,scssOperator,scssDefault "me=e-1 means that the last char of the pattern is not highlighted -syn match scssMixin "^@mixin" nextgroup=scssMixinName -syn match scssMixinName " [[:alnum:]_-]\+" contained nextgroup=scssDefinition -syn match scssFunction "^@function" nextgroup=scssFunctionName -syn match scssFunctionName " [[:alnum:]_-]\+" contained nextgroup=scssDefinition -syn match scssReturn "@return" contained -syn match scssInclude "@include" nextgroup=scssMixinName -syn match scssExtend "@extend .*[;}]"me=e-1 contains=cssTagName,scssIdChar,scssClassChar - -syn match scssColor "#[0-9A-Fa-f]\{3\}\>" contained -syn match scssColor "#[0-9A-Fa-f]\{6\}\>" contained - -syn match scssIdChar "#[[:alnum:]_-]\@=" nextgroup=scssId contains=scssColor -syn match scssId "[[:alnum:]_-]\+" contained -syn match scssClassChar "\.[[:alnum:]_-]\@=" nextgroup=scssClass -syn match scssClass "[[:alnum:]_-]\+" contained -syn match scssAmpersand "&" nextgroup=cssPseudoClass - -syn match scssOperator "+" contained -syn match scssOperator "-" contained -syn match scssOperator "/" contained -syn match scssOperator "*" contained - -syn match scssNestedSelector "[^/]* {"me=e-1 contained contains=cssTagName,cssAttributeSelector,scssIdChar,scssClassChar,scssAmpersand,scssVariable,scssMixin,scssFunction,@scssControl,scssInterpolation,scssNestedProperty -syn match scssNestedProperty "[[:alnum:]]\+:"me=e-1 contained - -syn match scssDebug "@debug" -syn match scssWarn "@warn" -syn match scssDefault "!default" contained - -syn match scssIf "@if" -syn match scssElse "@else" -syn match scssElseIf "@else if" -syn match scssWhile "@while" -syn match scssFor "@for" nextgroup=scssVariable -syn match scssFrom " from " -syn match scssTo " to " -syn match scssThrough " through " -syn match scssEach "@each" nextgroup=scssVariable -syn match scssIn " in " -syn cluster scssControl contains=scssIf,scssElse,scssElseIf,scssWhile,scssFor,scssFrom,scssTo,scssThrough,scssEach,scssIn - -syn match scssComment "//.*$" contains=@Spell -syn region scssImportStr start="\"" end="\"" -syn region scssImport start="@import" end=";" contains=scssImportStr,scssComment,cssComment,cssUnicodeEscape,cssMediaType - -hi def link scssVariable Identifier -hi def link scssVariableValue Constant -hi def link scssMixin PreProc -hi def link scssMixinName Function -hi def link scssFunction PreProc -hi def link scssFunctionName Function -hi def link scssReturn Statement -hi def link scssInclude PreProc -hi def link scssExtend PreProc -hi def link scssComment Comment -hi def link scssColor Constant -hi def link scssIdChar Special -hi def link scssClassChar Special -hi def link scssId Identifier -hi def link scssClass Identifier -hi def link scssAmpersand Character -hi def link scssNestedProperty Type -hi def link scssDebug Debug -hi def link scssWarn Debug -hi def link scssDefault Special -hi def link scssIf Conditional -hi def link scssElse Conditional -hi def link scssElseIf Conditional -hi def link scssWhile Repeat -hi def link scssFor Repeat -hi def link scssFrom Repeat -hi def link scssTo Repeat -hi def link scssThrough Repeat -hi def link scssEach Repeat -hi def link scssIn Repeat -hi def link scssInterpolation Delimiter -hi def link scssImport Include -hi def link scssImportStr Include - -let b:current_syntax = "scss" diff -r 973b7f21b582 -r bbcffc594d1e rc/vim-syntax-slim --- a/rc/vim-syntax-slim Mon Mar 17 11:30:05 2014 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -" Vim syntax file -" Language: Slim -" Maintainer: Andrew Stone -" Version: 1 -" Last Change: 2010 Sep 25 -" TODO: Feedback is welcomed. - -" Quit when a syntax file is already loaded. -if exists("b:current_syntax") - finish -endif - -if !exists("main_syntax") - let main_syntax = 'slim' -endif - -" Allows a per line syntax evaluation. -let b:ruby_no_expensive = 1 - -" Include Ruby syntax highlighting -syn include @slimRubyTop syntax/ruby.vim -unlet! b:current_syntax -" Include Haml syntax highlighting -syn include @slimHaml syntax/haml.vim -unlet! b:current_syntax - -syn match slimBegin "^\s*\(&[^= ]\)\@!" nextgroup=slimTag,slimClassChar,slimIdChar,slimRuby - -syn region rubyCurlyBlock start="{" end="}" contains=@slimRubyTop contained -syn cluster slimRubyTop add=rubyCurlyBlock - -syn cluster slimComponent contains=slimClassChar,slimIdChar,slimWrappedAttrs,slimRuby,slimAttr,slimInlineTagChar - -syn keyword slimDocType contained html 5 1.1 strict frameset mobile basic transitional -syn match slimDocTypeKeyword "^\s*\(doctype\)\s\+" nextgroup=slimDocType - -syn keyword slimTodo FIXME TODO NOTE OPTIMIZE XXX contained - -syn match slimTag "\w\+" contained contains=htmlTagName nextgroup=@slimComponent -syn match slimIdChar "#{\@!" contained nextgroup=slimId -syn match slimId "\%(\w\|-\)\+" contained nextgroup=@slimComponent -syn match slimClassChar "\." contained nextgroup=slimClass -syn match slimClass "\%(\w\|-\)\+" contained nextgroup=@slimComponent -syn match slimInlineTagChar "\s*:\s*" contained nextgroup=slimTag,slimClassChar,slimIdChar - -syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*{\s*" skip="}\s*\"" end="\s*}\s*" contained contains=slimAttr nextgroup=slimRuby -syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*\[\s*" end="\s*\]\s*" contained contains=slimAttr nextgroup=slimRuby -syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*(\s*" end="\s*)\s*" contained contains=slimAttr nextgroup=slimRuby - -syn match slimAttr "\s*\%(\w\|-\)\+\s*" contained contains=htmlArg nextgroup=slimAttrAssignment -syn match slimAttrAssignment "\s*=\s*" contained nextgroup=slimWrappedAttrValue,slimAttrString - -syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="{" end="}" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar -syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="\[" end="\]" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar -syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="(" end=")" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar - -syn region slimAttrString start=+\s*"+ skip=+\%(\\\\\)*\\"+ end=+"\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr,slimRuby,slimInlineTagChar -syn region slimAttrString start=+\s*'+ skip=+\%(\\\\\)*\\"+ end=+'\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr,slimRuby,slimInlineTagChar - -syn region slimInnerAttrString start=+\s*"+ skip=+\%(\\\\\)*\\"+ end=+"\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr -syn region slimInnerAttrString start=+\s*'+ skip=+\%(\\\\\)*\\"+ end=+'\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr - -syn region slimInterpolation matchgroup=slimInterpolationDelimiter start="#{" end="}" contains=@hamlRubyTop containedin=javascriptStringS,javascriptStringD,slimWrappedAttrs -syn match slimInterpolationEscape "\\\@.*\(\n\1\s.*\)*/ contains=@slimHaml,slimFilter - -syn match slimIEConditional "\%(^\s*/\)\@<=\[\s*if\>[^]]*]" contained containedin=slimComment - -hi def link slimAttrString String -hi def link slimBegin String -hi def link slimClass Type -hi def link slimClassChar Type -hi def link slimComment Comment -hi def link slimDocType Identifier -hi def link slimDocTypeKeyword Keyword -hi def link slimFilter Keyword -hi def link slimIEConditional SpecialComment -hi def link slimId Identifier -hi def link slimIdChar Identifier -hi def link slimInnerAttrString String -hi def link slimInterpolationDelimiter Delimiter -hi def link slimRubyChar Special -hi def link slimRubyOutputChar Special -hi def link slimText String -hi def link slimTodo Todo -hi def link slimWrappedAttrValueDelimiter Delimiter -hi def link slimWrappedAttrsDelimiter Delimiter -hi def link slimInlineTagChar Delimiter - -let b:current_syntax = "slim" diff -r 973b7f21b582 -r bbcffc594d1e setup --- a/setup Mon Mar 17 11:30:05 2014 +0900 +++ b/setup Mon Mar 17 15:47:15 2014 +0900 @@ -130,6 +130,16 @@ done } +_vim_syntax() { + _echon "Copying vim syntaxes..." + for i in "${basedir}/vendor/vim-syntax"/*.vim; do + syntax_file_name="`basename "/${i}"`" + _echon "[${syntax_file_name}]" + _rc "${1}" "../vendor/vim-syntax/${syntax_file_name}" ".vim/syntax/${syntax_file_name}" > /dev/null + done + _echo ...done +} + _help() { cat < /dev/null 2>&1 ]; then + echo wget is required + exit 1 +fi + +_get() { + wget --no-check-certificate -nv "$1" +} + +cd "$(dirname "$0")/vendor/vim-syntax" + +rm -f *.vim +_get https://vim.googlecode.com/hg/runtime/syntax/ruby.vim +_get https://vim.googlecode.com/hg/runtime/syntax/eruby.vim +_get https://vim.googlecode.com/hg/runtime/syntax/scss.vim +_get https://github.com/kchmck/vim-coffee-script/raw/master/syntax/coffee.vim +_get https://github.com/slim-template/vim-slim/raw/master/syntax/slim.vim +_get https://github.com/elzr/vim-json/raw/master/syntax/json.vim diff -r 973b7f21b582 -r bbcffc594d1e vendor/vim-syntax/coffee.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/vim-syntax/coffee.vim Mon Mar 17 15:47:15 2014 +0900 @@ -0,0 +1,221 @@ +" Language: CoffeeScript +" Maintainer: Mick Koch +" 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 +silent! unlet b:current_syntax + +" Highlight long strings. +syntax sync fromstart + +" 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 /\/ 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*\)\@<=[+\-*/%&|\^=!<>?.]\{-1,}\|[-=]>\|--\|++\|:/ +\ 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 +hi def link coffeeSpecialVar Special + +" An @-variable +syn match coffeeSpecialIdent /@\%(\%(\I\|\$\)\%(\i\|\$\)*\)\?/ display +hi def link coffeeSpecialIdent Identifier + +" 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,coffeeSpecialIdent, +\ 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\|\$\)\@/ display +syn match coffeeNumber /\<0[bB][01]\+\>/ display +syn match coffeeNumber /\<0[oO][0-7]\+\>/ display +syn match coffeeNumber /\<\%(Infinity\|NaN\)\>/ display +hi def link coffeeNumber Number + +" A floating-point number, including a leading plus or minus +syn match coffeeFloat /\%(\i\|\$\)\@/ +\ display +hi def link coffeeReservedError Error + +" A normal object assignment +syn match coffeeObjAssign /@\?\%(\I\|\$\)\%(\i\|\$\)*\s*\ze::\@!/ contains=@coffeeIdentifier display +hi def link coffeeObjAssign Identifier + +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=/`/ keepend +\ 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\|\$\)\@ +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'eruby' +endif + +if !exists("g:eruby_default_subtype") + let g:eruby_default_subtype = "html" +endif + +if &filetype =~ '^eruby\.' + let b:eruby_subtype = matchstr(&filetype,'^eruby\.\zs\w\+') +elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' + let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") + let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') + if b:eruby_subtype == '' + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + endif + if b:eruby_subtype == 'rhtml' + let b:eruby_subtype = 'html' + elseif b:eruby_subtype == 'rb' + let b:eruby_subtype = 'ruby' + elseif b:eruby_subtype == 'yml' + let b:eruby_subtype = 'yaml' + elseif b:eruby_subtype == 'js' + let b:eruby_subtype = 'javascript' + elseif b:eruby_subtype == 'txt' + " Conventional; not a real file type + let b:eruby_subtype = 'text' + elseif b:eruby_subtype == '' + let b:eruby_subtype = g:eruby_default_subtype + endif +endif + +if !exists("b:eruby_nest_level") + let b:eruby_nest_level = strlen(substitute(substitute(substitute(expand("%:t"),'@','','g'),'\c\.\%(erb\|rhtml\)\>','@','g'),'[^@]','','g')) +endif +if !b:eruby_nest_level + let b:eruby_nest_level = 1 +endif + +if exists("b:eruby_subtype") && b:eruby_subtype != '' + exe "runtime! syntax/".b:eruby_subtype.".vim" + unlet! b:current_syntax +endif +syn include @rubyTop syntax/ruby.vim + +syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment + +exe 'syn region erubyOneLiner matchgroup=erubyDelimiter start="^%\{1,'.b:eruby_nest_level.'\}%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline' +exe 'syn region erubyBlock matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}%\@!-\=" end="[=-]\=%\@" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend' +exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}=\{1,4}" end="[=-]\=%\@" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend' +exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}-\=#" end="[=-]\=%\@" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend' + +" Define the default highlighting. + +hi def link erubyDelimiter PreProc +hi def link erubyComment Comment + +let b:current_syntax = 'eruby' + +if main_syntax == 'eruby' + unlet main_syntax +endif + +" vim: nowrap sw=2 sts=2 ts=8: diff -r 973b7f21b582 -r bbcffc594d1e vendor/vim-syntax/json.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/vim-syntax/json.vim Mon Mar 17 15:47:15 2014 +0900 @@ -0,0 +1,128 @@ +" Vim syntax file +" Language: JSON +" Maintainer: Eli Parra +" Last Change: 2013-02-01 +" Version: 0.12 + +if !exists("main_syntax") + if version < 600 + syntax clear + elseif exists("b:current_syntax") + finish + endif + let main_syntax = 'json' +endif + +syntax match jsonNoise /\%(:\|,\)/ + +" NOTE that for the concealing to work your conceallevel should be set to 2 + +" Syntax: Strings +if has('conceal') + syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape +else + syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape +endif + +" Syntax: JSON does not allow strings with single quotes, unlike JavaScript. +syn region jsonStringSQ oneline start=+'+ skip=+\\\\\|\\"+ end=+'+ + +" Syntax: JSON Keywords +" Separated into a match and region because a region by itself is always greedy +syn match jsonKeywordMatch /"[^\"\:]\+"[[:blank:]\r\n]*\:/ contains=jsonKeywordRegion +if has('conceal') + syn region jsonKeywordRegion matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained +else + syn region jsonKeywordRegion matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained +endif + +" Syntax: Escape sequences +syn match jsonEscape "\\["\\/bfnrt]" contained +syn match jsonEscape "\\u\x\{4}" contained + +" Syntax: Numbers +syn match jsonNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" + +" ERROR WARNINGS ********************************************** +" +" Syntax: Strings should always be enclosed with quotes. +syn match jsonNoQuotes "\<[[:alpha:]]\+\>" + +" Syntax: An integer part of 0 followed by other digits is not allowed. +syn match jsonNumError "-\=\<0\d\.\d*\>" + +" Syntax: Decimals smaller than one should begin with 0 (so .1 should be 0.1). +syn match jsonNumError "\:\@<=[[:blank:]\r\n]*\zs\.\d\+" + +" Syntax: No comments in JSON, see http://stackoverflow.com/questions/244777/can-i-comment-a-json-file +syn match jsonCommentError "//.*" +syn match jsonCommentError "\(/\*\)\|\(\*/\)" + +" Syntax: No semicolons in JSON +syn match jsonSemicolonError ";" + +" Syntax: No trailing comma after the last element of arrays or objects +syn match jsonCommaError ",\_s*[}\]]" + +" ********************************************** END OF ERROR WARNINGS +" Allowances for JSONP: function call at the beginning of the file, +" parenthesis and semicolon at the end. +" Function name validation based on +" http://stackoverflow.com/questions/2008279/validate-a-javascript-function-name/2008444#2008444 +syn match jsonPadding "\%^[[:blank:]\r\n]*[_$[:alpha:]][_$[:alnum:]]*[[:blank:]\r\n]*(" +syn match jsonPadding ");[[:blank:]\r\n]*\%$" + +" Syntax: Boolean +syn keyword jsonBoolean true false + +" Syntax: Null +syn keyword jsonNull null + +" Syntax: Braces +syn region jsonFold matchgroup=jsonBraces start="{" end="}" transparent fold +syn region jsonFold matchgroup=jsonBraces start="\[" end="]" transparent fold + +" 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_json_syn_inits") + if version < 508 + let did_json_syn_inits = 1 + command -nargs=+ HiLink hi link + else + command -nargs=+ HiLink hi def link + endif + HiLink jsonPadding Operator + HiLink jsonString String + HiLink jsonEscape Special + HiLink jsonNumber Number + HiLink jsonBraces Operator + HiLink jsonNull Function + HiLink jsonBoolean Boolean + HiLink jsonKeywordRegion Label + + HiLink jsonNumError Error + HiLink jsonCommentError Error + HiLink jsonSemicolonError Error + HiLink jsonCommaError Error + HiLink jsonStringSQ Error + HiLink jsonNoQuotes Error + HiLink jsonQuote Quote + HiLink jsonNoise Noise + delcommand HiLink +endif + +let b:current_syntax = "json" +if main_syntax == 'json' + unlet main_syntax +endif + +" Vim settings +" vim: ts=8 fdm=marker + +" MIT License +" Copyright (c) 2013, Jeroen Ruigrok van der Werven, Eli Parra +"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +"THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +"See https://twitter.com/elzr/status/294964017926119424 diff -r 973b7f21b582 -r bbcffc594d1e vendor/vim-syntax/ruby.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/vim-syntax/ruby.vim Mon Mar 17 15:47:15 2014 +0900 @@ -0,0 +1,371 @@ +" Vim syntax file +" Language: Ruby +" Maintainer: Doug Kearns +" URL: https://github.com/vim-ruby/vim-ruby +" Release Coordinator: Doug Kearns +" ---------------------------------------------------------------------------- +" +" Previous Maintainer: Mirko Nasato +" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) +" ---------------------------------------------------------------------------- + +if exists("b:current_syntax") + finish +endif + +if has("folding") && exists("ruby_fold") + setlocal foldmethod=syntax +endif + +syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo + +if exists("ruby_space_errors") + if !exists("ruby_no_trail_space_error") + syn match rubySpaceError display excludenl "\s\+$" + endif + if !exists("ruby_no_tab_space_error") + syn match rubySpaceError display " \+\t"me=e-1 + endif +endif + +" Operators +if exists("ruby_operators") + syn match rubyOperator "[~!^&|*/%+-]\|\%(class\s*\)\@\|<=\|\%(<\|\>\|>=\|=\@\|\*\*\|\.\.\.\|\.\.\|::" + syn match rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=" + syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop +endif + +" Expression Substitution and Backslash Notation +syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display +syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display +syn match rubyQuoteEscape "\\[\\']" contained display + +syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop +syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable +syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained +syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable +syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained +syn region rubyNoInterpolation start="\\#{" end="}" contained +syn match rubyNoInterpolation "\\#{" display contained +syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained +syn match rubyNoInterpolation "\\#\$\W" display contained + +syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE + +syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained +syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained +syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained +syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained + +" These are mostly Oniguruma ready +syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained +syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial +syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline +syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display +syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained +syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained +syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display +syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display +syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display +syn match rubyRegexpDot "\." contained display +syn match rubyRegexpSpecial "|" contained display +syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display +syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display +syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display +syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display +syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display + +syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape +syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets +syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment + +" Numbers and ASCII Codes +syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display + +" Identifiers +syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent +syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent + +syn match rubyConstant "\%(\%([.@$]\@\|::\)\@=\%(\s*(\)\@!" +syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display +syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" +syn match rubySymbol "[]})\"':]\@\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" +syn match rubySymbol "[]})\"':]\@_,;:!?/.'"@$*\&+0]\)" +syn match rubySymbol "[]})\"':]\@\@!\)\=" +syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1 +syn match rubySymbol "[]})\"':]\@\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter + +syn match rubyInvalidVariable "$[^ A-Za-z_-]" +syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# +syn match rubyPredefinedVariable "$\d\+" display +syn match rubyPredefinedVariable "$_\>" display +syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display +syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display +syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" +syn match rubyPredefinedConstant "\%(\%(\.\@\%(\s*(\)\@!" + +" Normal Regular Expression +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold + +" Generalized Regular Expression +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold +syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold + +" Normal String and Shell Command Output +syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold +syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold +syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold + +" Generalized Single Quoted String, Symbol and Array of Strings +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape +syn region rubyString matchgroup=rubyStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1" skip="\\\\\|\\\z1" fold +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape +syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape + +" Generalized Double Quoted String and Array of Strings and Shell Command Output +" Note: %= is not matched here as the beginning of a double quoted string +syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold +syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@rubyStringSpecial fold + +" Here Document +syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration + +syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter + +" Keywords +" Note: the following keywords have already been defined: +" begin case class def do end for if module unless until while +syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" +syn match rubyOperator "\[?!]\@!" +syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" +syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise +syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" + +" Expensive Mode - match 'end' with the appropriate opening keyword for syntax +" based folding and special highlighting of module/class/method definitions +if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") + syn match rubyDefine "\" nextgroup=rubyAliasDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyDefine "\" nextgroup=rubyFunction skipwhite skipnl + syn match rubyClass "\" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyModule "\" nextgroup=rubyModuleDeclaration skipwhite skipnl + + syn region rubyMethodBlock start="\" matchgroup=rubyDefine end="\%(\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyClass end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyBlock start="\" matchgroup=rubyModule end="\" contains=ALLBUT,@rubyNotTop fold + + " modifiers + syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display + syn match rubyRepeatModifier "\<\%(while\|until\)\>" display + + syn region rubyDoBlock matchgroup=rubyControl start="\" end="\" contains=ALLBUT,@rubyNotTop fold + " curly bracket block or hash literal + syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold + syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyCaseExpression matchgroup=rubyConditional start="\" end="\" contains=ALLBUT,@rubyNotTop fold + syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" end="\%(\%(\%(\.\@" contains=ALLBUT,@rubyNotTop fold + + syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression + syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression + + syn match rubyExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression + syn match rubyMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyMethodBlock + + " statements with optional 'do' + syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyOptionalDo end="\%(\\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop + syn region rubyRepeatExpression start="\[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@" matchgroup=rubyRepeat end="\" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold + + if !exists("ruby_minlines") + let ruby_minlines = 500 + endif + exec "syn sync minlines=" . ruby_minlines + +else + syn match rubyControl "\[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl + syn match rubyControl "\[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl + syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|end\)\>[?!]\@!" + syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" +endif + +" Special Methods +if !exists("ruby_no_special_methods") + syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function + " attr is a common variable name + syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" + syn keyword rubyAttribute attr_accessor attr_reader attr_writer + syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)" + syn keyword rubyEval eval class_eval instance_eval module_eval + syn keyword rubyException raise fail catch throw + " false positive with 'include?' + syn match rubyInclude "\[?!]\@!" + syn keyword rubyInclude autoload extend load prepend require require_relative + syn keyword rubyKeyword callcc caller lambda proc +endif + +" Comments and Documentation +syn match rubySharpBang "\%^#!.*" display +syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX todo contained +syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell +if !exists("ruby_no_comment_fold") + syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE + +syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE +syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE + +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE +syn match rubyKeywordAsMethod "\%(\%(\.\@" transparent contains=NONE + +" __END__ Directive +syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold + +hi def link rubyClass rubyDefine +hi def link rubyModule rubyDefine +hi def link rubyMethodExceptional rubyDefine +hi def link rubyDefine Define +hi def link rubyFunction Function +hi def link rubyConditional Conditional +hi def link rubyConditionalModifier rubyConditional +hi def link rubyExceptional rubyConditional +hi def link rubyRepeat Repeat +hi def link rubyRepeatModifier rubyRepeat +hi def link rubyOptionalDo rubyRepeat +hi def link rubyControl Statement +hi def link rubyInclude Include +hi def link rubyInteger Number +hi def link rubyASCIICode Character +hi def link rubyFloat Float +hi def link rubyBoolean Boolean +hi def link rubyException Exception +if !exists("ruby_no_identifiers") + hi def link rubyIdentifier Identifier +else + hi def link rubyIdentifier NONE +endif +hi def link rubyClassVariable rubyIdentifier +hi def link rubyConstant Type +hi def link rubyGlobalVariable rubyIdentifier +hi def link rubyBlockParameter rubyIdentifier +hi def link rubyInstanceVariable rubyIdentifier +hi def link rubyPredefinedIdentifier rubyIdentifier +hi def link rubyPredefinedConstant rubyPredefinedIdentifier +hi def link rubyPredefinedVariable rubyPredefinedIdentifier +hi def link rubySymbol Constant +hi def link rubyKeyword Keyword +hi def link rubyOperator Operator +hi def link rubyBeginEnd Statement +hi def link rubyAccess Statement +hi def link rubyAttribute Statement +hi def link rubyEval Statement +hi def link rubyPseudoVariable Constant + +hi def link rubyComment Comment +hi def link rubyData Comment +hi def link rubyDataDirective Delimiter +hi def link rubyDocumentation Comment +hi def link rubyTodo Todo + +hi def link rubyQuoteEscape rubyStringEscape +hi def link rubyStringEscape Special +hi def link rubyInterpolationDelimiter Delimiter +hi def link rubyNoInterpolation rubyString +hi def link rubySharpBang PreProc +hi def link rubyRegexpDelimiter rubyStringDelimiter +hi def link rubySymbolDelimiter rubyStringDelimiter +hi def link rubyStringDelimiter Delimiter +hi def link rubyHeredoc rubyString +hi def link rubyString String +hi def link rubyRegexpEscape rubyRegexpSpecial +hi def link rubyRegexpQuantifier rubyRegexpSpecial +hi def link rubyRegexpAnchor rubyRegexpSpecial +hi def link rubyRegexpDot rubyRegexpCharClass +hi def link rubyRegexpCharClass rubyRegexpSpecial +hi def link rubyRegexpSpecial Special +hi def link rubyRegexpComment Comment +hi def link rubyRegexp rubyString + +hi def link rubyInvalidVariable Error +hi def link rubyError Error +hi def link rubySpaceError rubyError + +let b:current_syntax = "ruby" + +" vim: nowrap sw=2 sts=2 ts=8 noet: diff -r 973b7f21b582 -r bbcffc594d1e vendor/vim-syntax/scss.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/vim-syntax/scss.vim Mon Mar 17 15:47:15 2014 +0900 @@ -0,0 +1,20 @@ +" Vim syntax file +" Language: SCSS +" Maintainer: Tim Pope +" Filenames: *.scss +" Last Change: 2010 Jul 26 + +if exists("b:current_syntax") + finish +endif + +runtime! syntax/sass.vim + +syn match scssComment "//.*" contains=sassTodo,@Spell +syn region scssComment start="/\*" end="\*/" contains=sassTodo,@Spell + +hi def link scssComment sassComment + +let b:current_syntax = "scss" + +" vim:set sw=2: diff -r 973b7f21b582 -r bbcffc594d1e vendor/vim-syntax/slim.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vendor/vim-syntax/slim.vim Mon Mar 17 15:47:15 2014 +0900 @@ -0,0 +1,101 @@ +" Vim syntax file +" Language: Slim +" Maintainer: Andrew Stone +" Version: 1 +" Last Change: 2010 Sep 25 +" TODO: Feedback is welcomed. + +" Quit when a syntax file is already loaded. +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'slim' +endif + +" Allows a per line syntax evaluation. +let b:ruby_no_expensive = 1 + +" Include Ruby syntax highlighting +syn include @slimRubyTop syntax/ruby.vim +unlet! b:current_syntax +" Include Haml syntax highlighting +syn include @slimHaml syntax/haml.vim +unlet! b:current_syntax + +syn match slimBegin "^\s*\(&[^= ]\)\@!" nextgroup=slimTag,slimClassChar,slimIdChar,slimRuby + +syn region rubyCurlyBlock start="{" end="}" contains=@slimRubyTop contained +syn cluster slimRubyTop add=rubyCurlyBlock + +syn cluster slimComponent contains=slimClassChar,slimIdChar,slimWrappedAttrs,slimRuby,slimAttr,slimInlineTagChar + +syn keyword slimDocType contained html 5 1.1 strict frameset mobile basic transitional +syn match slimDocTypeKeyword "^\s*\(doctype\)\s\+" nextgroup=slimDocType + +syn keyword slimTodo FIXME TODO NOTE OPTIMIZE XXX contained +syn keyword htmlTagName contained script + +syn match slimTag "\w\+[><]*" contained contains=htmlTagName nextgroup=@slimComponent +syn match slimIdChar "#{\@!" contained nextgroup=slimId +syn match slimId "\%(\w\|-\)\+" contained nextgroup=@slimComponent +syn match slimClassChar "\." contained nextgroup=slimClass +syn match slimClass "\%(\w\|-\)\+" contained nextgroup=@slimComponent +syn match slimInlineTagChar "\s*:\s*" contained nextgroup=slimTag,slimClassChar,slimIdChar + +syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*{\s*" skip="}\s*\"" end="\s*}\s*" contained contains=slimAttr nextgroup=slimRuby +syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*\[\s*" end="\s*\]\s*" contained contains=slimAttr nextgroup=slimRuby +syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*(\s*" end="\s*)\s*" contained contains=slimAttr nextgroup=slimRuby + +syn match slimAttr "\s*\%(\w\|-\)\+\s*" contained contains=htmlArg nextgroup=slimAttrAssignment +syn match slimAttrAssignment "\s*=\s*" contained nextgroup=slimWrappedAttrValue,slimAttrString + +syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="{" end="}" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar +syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="\[" end="\]" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar +syn region slimWrappedAttrValue matchgroup=slimWrappedAttrValueDelimiter start="(" end=")" contained contains=slimAttrString,@slimRubyTop nextgroup=slimAttr,slimRuby,slimInlineTagChar + +syn region slimAttrString start=+\s*"+ skip=+\%(\\\\\)*\\"+ end=+"\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr,slimRuby,slimInlineTagChar +syn region slimAttrString start=+\s*'+ skip=+\%(\\\\\)*\\"+ end=+'\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr,slimRuby,slimInlineTagChar + +syn region slimInnerAttrString start=+\s*"+ skip=+\%(\\\\\)*\\"+ end=+"\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr +syn region slimInnerAttrString start=+\s*'+ skip=+\%(\\\\\)*\\"+ end=+'\s*+ contained contains=slimInterpolation,slimInterpolationEscape nextgroup=slimAttr + +syn region slimInterpolation matchgroup=slimInterpolationDelimiter start="#{" end="}" contains=@hamlRubyTop containedin=javascriptStringS,javascriptStringD,slimWrappedAttrs +syn region slimInterpolation matchgroup=slimInterpolationDelimiter start="#{{" end="}}" contains=@hamlRubyTop containedin=javascriptStringS,javascriptStringD,slimWrappedAttrs +syn match slimInterpolationEscape "\\\@.*\(\n\1\s.*\)*/ contains=@slimHaml,slimFilter + +syn match slimIEConditional "\%(^\s*/\)\@<=\[\s*if\>[^]]*]" contained containedin=slimComment + +hi def link slimAttrString String +hi def link slimBegin String +hi def link slimClass Type +hi def link slimAttr Type +hi def link slimClassChar Type +hi def link slimComment Comment +hi def link slimDocType Identifier +hi def link slimDocTypeKeyword Keyword +hi def link slimFilter Keyword +hi def link slimIEConditional SpecialComment +hi def link slimId Identifier +hi def link slimIdChar Identifier +hi def link slimInnerAttrString String +hi def link slimInterpolationDelimiter Delimiter +hi def link slimRubyChar Special +hi def link slimRubyOutputChar Special +hi def link slimText String +hi def link slimTodo Todo +hi def link slimWrappedAttrValueDelimiter Delimiter +hi def link slimWrappedAttrsDelimiter Delimiter +hi def link slimInlineTagChar Delimiter + +let b:current_syntax = "slim"