Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated syntax files.

  • Loading branch information...
commit 75364849317116e1dafc459638eb4e37eae53483 1 parent 1008aa9
@h3rald authored
Showing with 589 additions and 218 deletions.
  1. +200 −200 .vim/syntax/css.vim
  2. +372 −0 .vim/syntax/ruby.vim
  3. +0 −1  .vimrc
  4. +17 −17 setup.rb
View
400 .vim/syntax/css.vim
@@ -1,200 +1,200 @@
-" Better CSS Syntax for Vim
-" Language: Cascading Style Sheets
-" Maintainer: Chris Yip <yesu326@gmail.com>, twitter: @Chris_Ys
-" URL: http://www.vim.org/scripts/script.php?script_id=3183
-" GIT: http://github.com/ChrisYs/Better-CSS-Syntax-for-Vim
-" Last Change: 2010/08/27
-" Full CSS2, most of HTML5 & CSS3 properties (include prefix like -moz-) supported
-
-" Quit when a syntax file was already loaded
-if exists("b:current_syntax")
- finish
-endif
-
-syn case ignore
-
-syn match cssTagName /\*/
-syn match cssTagName /\<\(a\|abbr\|acronym\|address\|applet\|area\|article\|aside\|audio\|b\|base\|basefont\|bdo\|big\|blockquote\|body\|br\|button\|canvas\|caption\|center\|cite\|code\|col\|colgroup\|command\|datalist\|dd\|del\|details\|dfn\|dir\|div\|dl\|dt\|em\|embed\|fieldset\|font\|form\|figcaption\|figure\|footer\|frame\|frameset\|h1\|h2\|h3\|h4\|h5\|h6\|head\|header\|hgroup\|hr\|html\|img\|i\|iframe\|img\|input\|ins\|isindex\|kbd\|keygen\|label\|legend\|li\|link\|map\|mark\|menu\|meta\|meter\|nav\|noframes\|noscript\|object\|ol\|optgroup\|option\|output\|p\|param\|pre\|progress\|q\|rp\|rt\|ruby\|s\|samp\|script\|section\|select\|small\|span\|strike\|strong\|style\|sub\|summary\|sup\|table\|tbody\|td\|textarea\|tfoot\|th\|thead\|time\|title\|tr\|tt\|ul\|u\|var\|variant\|video\|xmp\)\>/
-
-syn match cssClass "\.[A-Za-z][A-Za-z0-9_-]\{0,\}"
-
-syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
-
-syn match cssPrefix /\(-\(webkit\|moz\|o\|ms\)-\)\|filter/
-
-syn match cssNumber /\(-\)\=\(\.\d\+\|\d\+\(\.\d\+\)\{0,\}\)/ contained
-
-syn match cssPseudo /\:\{1,2\}\(link\|visited\|active\|hover\|focus\|before\|after\|left\|right\|root\|empty\|target\|enabled\|disabled\|checked\)\ze[ :,\.#\[\]{]\+/
-syn match cssPseudo /\:\{1,2\}first\-\(letter\|line\|child\)\ze[ :,\.#\[\]{]\+/
-syn match cssPseudo /\:\{1,2\}\(last\|only\)-child\ze[ :,\.#\[\]{]\+/
-syn match cssPseudo /\:\{1,2\}\(first\|last\|only\)-of-type)\ze[ :,\.#\[\]{]\+/
-syn match cssPseudo /\:\{1,2\}nth\(-last\)\{0,1\}-child([N0-9]\{0,\})\ze[ :,\.#\[\]{]\+/
-syn match cssPseudo /\:\{1,2\}nth\(-last\)\{0,1\}-of-type([N0-9]\{0,\})\ze[ :,\.#\[\]{]\+/
-syn match cssPseudo /\:\{1,2\}not([#\.]\{0,\}\S\+)\ze[ :,\.#\[\]{]\+/
-syn match cssPseudo /\:\{1,2\}lang([a-zA-Z]\{2\}\(-[a-zA-Z]\{2\}\)\{0,1\})\ze[ :,\.#\[\]{]\+/
-
-syn region cssFuncRegion start=/{/ end=/}/ contains=cssPropRegion
-
-syn match cssPropRegion /[^{}]*/ contained contains=cssProp,cssAttrBlock,cssPrefix,cssComment
-
-syn region cssAttrBlock start=/:\zs/ end=/\ze[;}]\{1\}/ contained contains=cssAttr,cssColor,cssImportant,cssNumber,cssUnits,cssQuote,cssFunction
-
-syn keyword cssAttr above absolute accent adjacent after alias all alphabetic alternate always auto avoid balance baseline back before behind below blink block bold bolder border both bottom capitalize caption cell center central circle clear clone code collapse compact copy crop cross crosshair current dashed default digits disc discard dot dotted double embed end fast faster fill first fixed forward front hanging help here hidden hide high higher horizontal icon ideographic inherit inhibit initial invert italic justify kashida landscape last left level lighter linear loud low lower ltr mathematical manual medium meet menu middle modal move multiple moderate narrower new none normal nowrap oblique overline parent perceptual pointer portrait progress reduced relative reverse ridge right root rtl same saturation scroll separate show silent single slice slide slow slower solid soft square start static stretch strong sub super suppress tab text tibetan top underline unrestricted vertical visible wait wider window contained
-
-syn match cssAttr /\<transparent\>/ contained
-
-syn match cssAttr /\<\(absolute\|relative\)-colorimetric\>/ contained
-syn match cssAttr /<\(pause\|rest\)-\(after\|before\)\>/ contained
-syn match cssAttr /\<\(x-\)\=\(weak\|strong\|low\|high\)\>/ contained
-syn match cssAttr /\(in\|out\)\(set\|side\)/ contained
-syn match cssAttr /\<\(block\|inline\)-axis\>/ contained
-syn match cssAttr /\<\(border\|content\)-box\>/ contained
-syn match cssAttr /\<x-\(loud\|soft\|slow\|fast\|low\|high\)\>/ contained
-syn match cssAttr /\<context-menu\|not-allowed\|vertical-text\|all-scroll\|from-image\|spell-out\|line-through\|bidi-override\|keep-all\>/ contained
-syn match cssAttr /\<inline\(-\(block\|table\)\)\{0,1\}\>/ contained
-syn match cssAttr /\<table\(-\(caption\|cell\|column\|row\)\)\{0,1\}\>/ contained
-syn match cssAttr /\<table\(-\(column\|footer\|header\|row\)-group\)\>/ contained
-syn match cssAttr /\<ruby\(-\(base\|text\)\(-group\)\{0,1\}\)\{0,1\}\>/ contained
-syn match cssAttr /\<\(exclude\|include\)-ruby\>/ contained
-syn match cssAttr /\<\(consider\|disregard\)-shifts\>/ contained
-syn match cssAttr /\<list-item\|run-in\>/ contained
-syn match cssAttr /\<\(\(\(block\|inline\)-line\)\|max\|grid\)-height\>/ contained
-syn match cssAttr /\<\(far\|left\|right\)-side\>/ contained
-syn match cssAttr /\<\(left\|right\)wards\>/ contained
-syn match cssAttr /\<\(center\|far\)-\(left\|right\)\>/ contained
-syn match cssAttr /\<\(\(text-\)\=\(before\|after\)-\(edge\|central\|ideographic\|alphabetic\|hanging\|mathematical\|use-script\)\)\>/ contained
-syn match cssAttr /\<\([nwse]\{1,4\}\|col\|row\)-resize\>/ contained
-syn match cssAttr /\<use-scriot\|reset-size\|caps-height\|status-bar\|message-box\>/ contained
-syn match cssAttr /\<small-\(caps\|caption\)\>/ contained
-syn match cssAttr /\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>/ contained
-syn match cssAttr /\<no-\(change\|content\|display\|drop\|limit\|repeat\)\>/ contained
-syn match cssAttr /\<repeat\(-\(x\|y\)\)\=\>/ contained
-syn match cssAttr /\<\(end\|line\)-edge\>/ contained
-syn match cssAttr /\<break-\(all\|word\|strict\)\>/ contained
-syn match cssAttr /\<\(upper\|lower\)case\>/ contained
-syn match cssAttr /\<distribute\(-\(letter\|space\)\)\=\>/ contained
-syn match cssAttr /\<\(literal\|no\)-punctuation\>/ contained
-syn match cssAttr /\<inter-\(word\|ideograph\|cluster\)\>/ contained
-syn match cssAttr /\<\(font\|text\|max\)-size\>/ contained
-syn match cssAttr /\<ease\(-\(in\|out\|in-out\)\)\=\>/ contained
-syn match cssAttr /\<text-\(top\|bottom\)\>/ contained
-syn match cssAttr /\<pre\(-\(wrap\|line\)\)\=\>/ contained
-syn match cssAttr /\<preserve\(-\(breaks\)\)\=\>/ contained
-
-syn match cssProp /\<\(appearance\|binding\|bottom\|clear\|clip\|color\|columns\|content\|crop\|cursor\|direction\|elevation\|empty-cells\|hanging-punctuation\|height\|hyphens\|icon\|inline-box-align\|left\|letter-spacing\|move-to\|opacity\|orphans\|phonemes\|position\|play-during\|presentation-level\|punctuation-trim\|quotes\|rendering-intent\|resize\|richness\|right\|size\|speech-rate\|stress\|string-set\|tab-size\|table-layout\|top\|unicode-bidi\|vertical-align\|visibility\|volume\|widows\|width\|z-index\|zimuth\)\>\ze\s*:/ contained
-
-syn match cssProp /\<alignment-\(adjust\|baseline\)\>\ze\s*:/ contained
-syn match cssProp /\<animation\(-\(delay\|direction\|duration\|iteration-count\|name\|play-state\|timing-function\)\)\{0,1\}\>\ze\s*:/ contained
-syn match cssProp /\<background\(-\(attachment\|break\|clip\|color\|image\|origin\|position\|repeat\|size\)\)\{0,1\}\>\ze\s*:/ contained
-syn match cssProp /\<baseline-shift\|caption-side\|color-profile\>\ze\s*:/ contained
-syn match cssProp /\<bookmark-\(label\|level\|target\)\>\ze\s*:/ contained
-syn match cssProp /\<border\(-\(bottom\|collapse\|color\|image\|left\|length\|radius\|right\|spacing\|style\|top\|width\)\)\{0,1\}\>\ze\s*:/ contained
-syn match cssProp /\<border\(-\(bottom\|left\|right\|top\)\(-\(color\|style\|wdith\)\)\{0,1\}\)\{0,1\}\>\ze\s*:/ contained
-syn match cssProp /\<border-\(bottom\|top\)-\(left\|right\)-radius\>\ze\s*:/ contained
-syn match cssProp /\<box-\(align\|decoration-break\|direction\|flex\|\(flex\|ordinal\)-group\|lines\|orient\|pack\|shadow\|sizing\)\>\ze\s*:/ contained
-syn match cssProp /\<column\(-\(\break-\(after\|before\)\|count\|fill\|gap\|rule\(-\(color\|style\|width\)\)\{0,1\}\)\|span\|width\)\>\ze\s*:/ contained
-syn match cssProp /\<counter-\(increment\|reset\)\>\ze\s*:/ contained
-syn match cssProp /\<cue\(-\(after\|before\)\)\{0,1\}\>\ze\s*:/ contained
-syn match cssProp /\<display\(-\(model\|role\)\)\{0,1\}\>\ze\s*:/ contained
-syn match cssProp /\<dominant-baseline\>\ze\s*:/ contained
-syn match cssProp /\<drop-initial-\(\(\(after\|before\)-\(adjust\|align\)\)\|size\|value\)\>\ze\s*:/ contained
-syn match cssProp /\<fit\(-position\)\{0,1\}\>\ze\s*:/ contained
-syn match cssProp /\<float\>\(-offset\)\{0,1\}\ze\s*:/ contained
-syn match cssProp /\<font\(-\(family\|size\(-adjust\)\=\|stretch\|style\|variant\|weight\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<grid-\(columns\|rows\)\>\ze\s*:/ contained
-syn match cssProp /\<hyphenate-\(after\|before\|character\|lines\|resource\)\>\ze\s*:/ contained
-syn match cssProp /\<image-\(orientation\|resolution\)\>\ze\s*:/ contained
-syn match cssProp /\<line-\(height\|stacking\(-\(ruby\|shift\|strategy\)\)\=\)\>\ze\s*:/ contained
-syn match cssProp /\<list-style\(-\(image\|position\|type\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<\(margin\|padding\)\(-\(bottom\|left\|right\|top\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<mark\(s\|-\(after\|before\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<marquee-\(direction\|play-count\|speed\|style\)\>\ze\s*:/ contained
-syn match cssProp /\<\(max\|min\)-\(height\|width\)\>\ze\s*:/ contained
-syn match cssProp /\<nav-\(down\|index\|left\|right\|up\)\>\ze\s*:/ contained
-syn match cssProp /\<outline\(-\(color\|offset\|style\|width\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<overflow\(-\(style\|x\|y\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<page\(-\(break-\(after\|before\|inside\)\|policy\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<pause\(-\(after\|before\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<pitch\(-range\)\=\>\ze\s*:/ contained
-syn match cssProp /\<rest\(-\(after\|before\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<rotation\(-point\)\=\>\ze\s*:/ contained
-syn match cssProp /\<ruby-\(align\|overhang\|position\|span\)\>\ze\s*:/ contained
-syn match cssProp /\<speak\(-\(header\|numeral\|punctuation\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<target\(-\(name\|new\|position\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<text-\(align\(-last\)\=\|decoration\|emphasis\|height\|indent\|justify\|outline\|replace\|shadow\|transform\|wrap\|overflow\)\>\ze\s*:/ contained
-syn match cssProp /\<transition\(-\(delay\|duration\|property\|timing-function\)\)\=\>\ze\s*:/ contained
-syn match cssProp /\<voice-\(balance\|duration\|family\|pitch\(-range\)\=\|rate\|stress\|volume\)\>\ze\s*:/ contained
-syn match cssProp /\<white-space\(-collapse\)\=\>\ze\s*:/ contained
-syn match cssProp /\<word-\(break\|spacing\|wrap\)\>\ze\s*:/ contained
-
-syn match cssSelector /\[[#\.]\{0,1\}\c[-a-z0-9]\+\([*^$]\{0,1\}=\c[-a-z0-9'"]\+\)\]/
-
-syn match cssUnits /%\|\(cm\|deg\|dpi\|em\|ex|\in\|mm\|pc\|pt\|px\|s\)\>/ contained
-
-syn match cssColor /#\(\x\{6\}\|\x\{3\}\)/ contained
-
-syn match cssImportant /!important\>/ contained
-
-syn region cssComment start=/\/\*/ end=/\*\// contains=@Spell
-
-syn region cssFunction start=/\c[-a-z0-9@]*(/ end=/)/ contained contains=cssFile
-
-syn region cssFile start=/url(\zs/ end=/\ze)/ contained
-
-syn match cssBraket /[{}]/ contained
-
-syn match cssQuote /\('.*'\|".*"\)/ contained
-
-" Define the default highlighting.
-command -nargs=+ HL hi def link <args>
-
-HL cssAttr SpecialKey
-
-HL cssAttrBlock Normal
-
-HL cssBraket Function
-
-HL cssClass Function
-
-HL cssColor Constant
-
-HL cssComment Comment
-
-HL cssError ErrorMsg
-
-HL cssFile Directory
-
-HL cssFunction Function
-
-HL cssFuncRegion Function
-
-HL cssIdentifier Identifier
-
-HL cssImportant PreProc
-
-HL cssUnits Special
-
-HL cssNumber Number
-
-HL cssPrefix Special
-
-HL cssProp Type
-
-HL cssPropRegion Normal
-
-HL cssPseudo Structure
-
-HL cssQuote String
-
-HL cssSelector Structure
-
-HL cssString String
-
-HL cssTagName Statement
-
-HL cssURL String
-
-delcommand HL
-
-let b:current_syntax = "css"
-"syn sync minlines=10
+" Better CSS Syntax for Vim
+" Language: Cascading Style Sheets
+" Maintainer: Chris Yip <yesu326@gmail.com>, twitter: @Chris_Ys
+" URL: http://www.vim.org/scripts/script.php?script_id=3183
+" GIT: http://github.com/ChrisYs/Better-CSS-Syntax-for-Vim
+" Last Change: 2010/08/27
+" Full CSS2, most of HTML5 & CSS3 properties (include prefix like -moz-) supported
+
+" Quit when a syntax file was already loaded
+if exists("b:current_syntax")
+ finish
+endif
+
+syn case ignore
+
+syn match cssTagName /\*/
+syn match cssTagName /\<\(a\|abbr\|acronym\|address\|applet\|area\|article\|aside\|audio\|b\|base\|basefont\|bdo\|big\|blockquote\|body\|br\|button\|canvas\|caption\|center\|cite\|code\|col\|colgroup\|command\|datalist\|dd\|del\|details\|dfn\|dir\|div\|dl\|dt\|em\|embed\|fieldset\|font\|form\|figcaption\|figure\|footer\|frame\|frameset\|h1\|h2\|h3\|h4\|h5\|h6\|head\|header\|hgroup\|hr\|html\|img\|i\|iframe\|img\|input\|ins\|isindex\|kbd\|keygen\|label\|legend\|li\|link\|map\|mark\|menu\|meta\|meter\|nav\|noframes\|noscript\|object\|ol\|optgroup\|option\|output\|p\|param\|pre\|progress\|q\|rp\|rt\|ruby\|s\|samp\|script\|section\|select\|small\|span\|strike\|strong\|style\|sub\|summary\|sup\|table\|tbody\|td\|textarea\|tfoot\|th\|thead\|time\|title\|tr\|tt\|ul\|u\|var\|variant\|video\|xmp\)\>/
+
+syn match cssClass "\.[A-Za-z][A-Za-z0-9_-]\{0,\}"
+
+syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
+
+syn match cssPrefix /\(-\(webkit\|moz\|o\|ms\)-\)\|filter/
+
+syn match cssNumber /\(-\)\=\(\.\d\+\|\d\+\(\.\d\+\)\{0,\}\)/ contained
+
+syn match cssPseudo /\:\{1,2\}\(link\|visited\|active\|hover\|focus\|before\|after\|left\|right\|root\|empty\|target\|enabled\|disabled\|checked\)\ze[ :,\.#\[\]{]\+/
+syn match cssPseudo /\:\{1,2\}first\-\(letter\|line\|child\)\ze[ :,\.#\[\]{]\+/
+syn match cssPseudo /\:\{1,2\}\(last\|only\)-child\ze[ :,\.#\[\]{]\+/
+syn match cssPseudo /\:\{1,2\}\(first\|last\|only\)-of-type)\ze[ :,\.#\[\]{]\+/
+syn match cssPseudo /\:\{1,2\}nth\(-last\)\{0,1\}-child([N0-9]\{0,\})\ze[ :,\.#\[\]{]\+/
+syn match cssPseudo /\:\{1,2\}nth\(-last\)\{0,1\}-of-type([N0-9]\{0,\})\ze[ :,\.#\[\]{]\+/
+syn match cssPseudo /\:\{1,2\}not([#\.]\{0,\}\S\+)\ze[ :,\.#\[\]{]\+/
+syn match cssPseudo /\:\{1,2\}lang([a-zA-Z]\{2\}\(-[a-zA-Z]\{2\}\)\{0,1\})\ze[ :,\.#\[\]{]\+/
+
+syn region cssFuncRegion start=/{/ end=/}/ contains=cssPropRegion
+
+syn match cssPropRegion /[^{}]*/ contained contains=cssProp,cssAttrBlock,cssPrefix,cssComment
+
+syn region cssAttrBlock start=/:\zs/ end=/\ze[;}]\{1\}/ contained contains=cssAttr,cssColor,cssImportant,cssNumber,cssUnits,cssQuote,cssFunction
+
+syn keyword cssAttr above absolute accent adjacent after alias all alphabetic alternate always auto avoid balance baseline back before behind below blink block bold bolder border both bottom capitalize caption cell center central circle clear clone code collapse compact copy crop cross crosshair current dashed default digits disc discard dot dotted double embed end fast faster fill first fixed forward front hanging help here hidden hide high higher horizontal icon ideographic inherit inhibit initial invert italic justify kashida landscape last left level lighter linear loud low lower ltr mathematical manual medium meet menu middle modal move multiple moderate narrower new none normal nowrap oblique overline parent perceptual pointer portrait progress reduced relative reverse ridge right root rtl same saturation scroll separate show silent single slice slide slow slower solid soft square start static stretch strong sub super suppress tab text tibetan top underline unrestricted vertical visible wait wider window contained
+
+syn match cssAttr /\<transparent\>/ contained
+
+syn match cssAttr /\<\(absolute\|relative\)-colorimetric\>/ contained
+syn match cssAttr /<\(pause\|rest\)-\(after\|before\)\>/ contained
+syn match cssAttr /\<\(x-\)\=\(weak\|strong\|low\|high\)\>/ contained
+syn match cssAttr /\(in\|out\)\(set\|side\)/ contained
+syn match cssAttr /\<\(block\|inline\)-axis\>/ contained
+syn match cssAttr /\<\(border\|content\)-box\>/ contained
+syn match cssAttr /\<x-\(loud\|soft\|slow\|fast\|low\|high\)\>/ contained
+syn match cssAttr /\<context-menu\|not-allowed\|vertical-text\|all-scroll\|from-image\|spell-out\|line-through\|bidi-override\|keep-all\>/ contained
+syn match cssAttr /\<inline\(-\(block\|table\)\)\{0,1\}\>/ contained
+syn match cssAttr /\<table\(-\(caption\|cell\|column\|row\)\)\{0,1\}\>/ contained
+syn match cssAttr /\<table\(-\(column\|footer\|header\|row\)-group\)\>/ contained
+syn match cssAttr /\<ruby\(-\(base\|text\)\(-group\)\{0,1\}\)\{0,1\}\>/ contained
+syn match cssAttr /\<\(exclude\|include\)-ruby\>/ contained
+syn match cssAttr /\<\(consider\|disregard\)-shifts\>/ contained
+syn match cssAttr /\<list-item\|run-in\>/ contained
+syn match cssAttr /\<\(\(\(block\|inline\)-line\)\|max\|grid\)-height\>/ contained
+syn match cssAttr /\<\(far\|left\|right\)-side\>/ contained
+syn match cssAttr /\<\(left\|right\)wards\>/ contained
+syn match cssAttr /\<\(center\|far\)-\(left\|right\)\>/ contained
+syn match cssAttr /\<\(\(text-\)\=\(before\|after\)-\(edge\|central\|ideographic\|alphabetic\|hanging\|mathematical\|use-script\)\)\>/ contained
+syn match cssAttr /\<\([nwse]\{1,4\}\|col\|row\)-resize\>/ contained
+syn match cssAttr /\<use-scriot\|reset-size\|caps-height\|status-bar\|message-box\>/ contained
+syn match cssAttr /\<small-\(caps\|caption\)\>/ contained
+syn match cssAttr /\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>/ contained
+syn match cssAttr /\<no-\(change\|content\|display\|drop\|limit\|repeat\)\>/ contained
+syn match cssAttr /\<repeat\(-\(x\|y\)\)\=\>/ contained
+syn match cssAttr /\<\(end\|line\)-edge\>/ contained
+syn match cssAttr /\<break-\(all\|word\|strict\)\>/ contained
+syn match cssAttr /\<\(upper\|lower\)case\>/ contained
+syn match cssAttr /\<distribute\(-\(letter\|space\)\)\=\>/ contained
+syn match cssAttr /\<\(literal\|no\)-punctuation\>/ contained
+syn match cssAttr /\<inter-\(word\|ideograph\|cluster\)\>/ contained
+syn match cssAttr /\<\(font\|text\|max\)-size\>/ contained
+syn match cssAttr /\<ease\(-\(in\|out\|in-out\)\)\=\>/ contained
+syn match cssAttr /\<text-\(top\|bottom\)\>/ contained
+syn match cssAttr /\<pre\(-\(wrap\|line\)\)\=\>/ contained
+syn match cssAttr /\<preserve\(-\(breaks\)\)\=\>/ contained
+
+syn match cssProp /\<\(appearance\|binding\|bottom\|clear\|clip\|color\|columns\|content\|crop\|cursor\|direction\|elevation\|empty-cells\|hanging-punctuation\|height\|hyphens\|icon\|inline-box-align\|left\|letter-spacing\|move-to\|opacity\|orphans\|phonemes\|position\|play-during\|presentation-level\|punctuation-trim\|quotes\|rendering-intent\|resize\|richness\|right\|size\|speech-rate\|stress\|string-set\|tab-size\|table-layout\|top\|unicode-bidi\|vertical-align\|visibility\|volume\|widows\|width\|z-index\|zimuth\)\>\ze\s*:/ contained
+
+syn match cssProp /\<alignment-\(adjust\|baseline\)\>\ze\s*:/ contained
+syn match cssProp /\<animation\(-\(delay\|direction\|duration\|iteration-count\|name\|play-state\|timing-function\)\)\{0,1\}\>\ze\s*:/ contained
+syn match cssProp /\<background\(-\(attachment\|break\|clip\|color\|image\|origin\|position\|repeat\|size\)\)\{0,1\}\>\ze\s*:/ contained
+syn match cssProp /\<baseline-shift\|caption-side\|color-profile\>\ze\s*:/ contained
+syn match cssProp /\<bookmark-\(label\|level\|target\)\>\ze\s*:/ contained
+syn match cssProp /\<border\(-\(bottom\|collapse\|color\|image\|left\|length\|radius\|right\|spacing\|style\|top\|width\)\)\{0,1\}\>\ze\s*:/ contained
+syn match cssProp /\<border\(-\(bottom\|left\|right\|top\)\(-\(color\|style\|wdith\)\)\{0,1\}\)\{0,1\}\>\ze\s*:/ contained
+syn match cssProp /\<border-\(bottom\|top\)-\(left\|right\)-radius\>\ze\s*:/ contained
+syn match cssProp /\<box-\(align\|decoration-break\|direction\|flex\|\(flex\|ordinal\)-group\|lines\|orient\|pack\|shadow\|sizing\)\>\ze\s*:/ contained
+syn match cssProp /\<column\(-\(\break-\(after\|before\)\|count\|fill\|gap\|rule\(-\(color\|style\|width\)\)\{0,1\}\)\|span\|width\)\>\ze\s*:/ contained
+syn match cssProp /\<counter-\(increment\|reset\)\>\ze\s*:/ contained
+syn match cssProp /\<cue\(-\(after\|before\)\)\{0,1\}\>\ze\s*:/ contained
+syn match cssProp /\<display\(-\(model\|role\)\)\{0,1\}\>\ze\s*:/ contained
+syn match cssProp /\<dominant-baseline\>\ze\s*:/ contained
+syn match cssProp /\<drop-initial-\(\(\(after\|before\)-\(adjust\|align\)\)\|size\|value\)\>\ze\s*:/ contained
+syn match cssProp /\<fit\(-position\)\{0,1\}\>\ze\s*:/ contained
+syn match cssProp /\<float\>\(-offset\)\{0,1\}\ze\s*:/ contained
+syn match cssProp /\<font\(-\(family\|size\(-adjust\)\=\|stretch\|style\|variant\|weight\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<grid-\(columns\|rows\)\>\ze\s*:/ contained
+syn match cssProp /\<hyphenate-\(after\|before\|character\|lines\|resource\)\>\ze\s*:/ contained
+syn match cssProp /\<image-\(orientation\|resolution\)\>\ze\s*:/ contained
+syn match cssProp /\<line-\(height\|stacking\(-\(ruby\|shift\|strategy\)\)\=\)\>\ze\s*:/ contained
+syn match cssProp /\<list-style\(-\(image\|position\|type\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<\(margin\|padding\)\(-\(bottom\|left\|right\|top\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<mark\(s\|-\(after\|before\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<marquee-\(direction\|play-count\|speed\|style\)\>\ze\s*:/ contained
+syn match cssProp /\<\(max\|min\)-\(height\|width\)\>\ze\s*:/ contained
+syn match cssProp /\<nav-\(down\|index\|left\|right\|up\)\>\ze\s*:/ contained
+syn match cssProp /\<outline\(-\(color\|offset\|style\|width\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<overflow\(-\(style\|x\|y\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<page\(-\(break-\(after\|before\|inside\)\|policy\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<pause\(-\(after\|before\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<pitch\(-range\)\=\>\ze\s*:/ contained
+syn match cssProp /\<rest\(-\(after\|before\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<rotation\(-point\)\=\>\ze\s*:/ contained
+syn match cssProp /\<ruby-\(align\|overhang\|position\|span\)\>\ze\s*:/ contained
+syn match cssProp /\<speak\(-\(header\|numeral\|punctuation\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<target\(-\(name\|new\|position\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<text-\(align\(-last\)\=\|decoration\|emphasis\|height\|indent\|justify\|outline\|replace\|shadow\|transform\|wrap\|overflow\)\>\ze\s*:/ contained
+syn match cssProp /\<transition\(-\(delay\|duration\|property\|timing-function\)\)\=\>\ze\s*:/ contained
+syn match cssProp /\<voice-\(balance\|duration\|family\|pitch\(-range\)\=\|rate\|stress\|volume\)\>\ze\s*:/ contained
+syn match cssProp /\<white-space\(-collapse\)\=\>\ze\s*:/ contained
+syn match cssProp /\<word-\(break\|spacing\|wrap\)\>\ze\s*:/ contained
+
+syn match cssSelector /\[[#\.]\{0,1\}\c[-a-z0-9]\+\([*^$]\{0,1\}=\c[-a-z0-9'"]\+\)\]/
+
+syn match cssUnits /%\|\(cm\|deg\|dpi\|em\|ex|\in\|mm\|pc\|pt\|px\|s\)\>/ contained
+
+syn match cssColor /#\(\x\{6\}\|\x\{3\}\)/ contained
+
+syn match cssImportant /!important\>/ contained
+
+syn region cssComment start=/\/\*/ end=/\*\// contains=@Spell
+
+syn region cssFunction start=/\c[-a-z0-9@]*(/ end=/)/ contained contains=cssFile
+
+syn region cssFile start=/url(\zs/ end=/\ze)/ contained
+
+syn match cssBraket /[{}]/ contained
+
+syn match cssQuote /\('.*'\|".*"\)/ contained
+
+" Define the default highlighting.
+command -nargs=+ HL hi def link <args>
+
+HL cssAttr SpecialKey
+
+HL cssAttrBlock Normal
+
+HL cssBraket Function
+
+HL cssClass Function
+
+HL cssColor Constant
+
+HL cssComment Comment
+
+HL cssError ErrorMsg
+
+HL cssFile Directory
+
+HL cssFunction Function
+
+HL cssFuncRegion Function
+
+HL cssIdentifier Identifier
+
+HL cssImportant PreProc
+
+HL cssUnits Special
+
+HL cssNumber Number
+
+HL cssPrefix Special
+
+HL cssProp Type
+
+HL cssPropRegion Normal
+
+HL cssPseudo Structure
+
+HL cssQuote String
+
+HL cssSelector Structure
+
+HL cssString String
+
+HL cssTagName Statement
+
+HL cssURL String
+
+delcommand HL
+
+let b:current_syntax = "css"
+"syn sync minlines=10
View
372 .vim/syntax/ruby.vim
@@ -0,0 +1,372 @@
+" Vim syntax file
+" Language: Ruby
+" Maintainer: Doug Kearns <dougkearns@gmail.com>
+" URL: https://github.com/vim-ruby/vim-ruby
+" Anon CVS: See above site
+" Release Coordinator: Doug Kearns <dougkearns@gmail.com>
+" ----------------------------------------------------------------------------
+"
+" 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*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\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\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
+syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display
+syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
+syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display
+syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display
+syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display
+syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display
+
+" Identifiers
+syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
+syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
+
+syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!"
+syn match rubyClassVariable "@@\h\w*" display
+syn match rubyInstanceVariable "@\h\w*" display
+syn match rubyGlobalVariable "$\%(\h\w*\|-.\)"
+syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
+syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
+syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\h\w*"
+syn match rubySymbol "[]})\"':]\@<!:\h\w*\%([?!=]>\@!\)\="
+syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1
+syn match rubySymbol "[]})\"':]\@<!\h\w*[!?]\=:\s\@="he=e-1
+syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1
+syn match rubySymbol "[[:space:],{]\h\w*[!?]\=:\s\@="hs=s+1,he=e-1
+syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
+syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
+
+syn match rubyBlockParameter "\h\w*" contained
+syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\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*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
+syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!"
+syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
+syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\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 keepend 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 fold
+syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape 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="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape
+syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" 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="%[QWx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
+syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" 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\)\@<!<<-\=\zs\%(\h\w*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
+syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
+syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
+syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
+
+syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<\z(\h\w*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
+syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
+syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend
+syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
+
+syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-\z(\h\w*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
+syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
+syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend
+syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
+
+if exists('main_syntax') && main_syntax == 'eruby'
+ let b:ruby_no_expensive = 1
+end
+
+syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable nextgroup=rubyAliasDeclaration2 skipwhite
+syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable
+syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable
+syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator
+syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator
+syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration
+syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
+syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[: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 "\<defined?" display
+syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!"
+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 "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl
+ syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
+ syn match rubyDefine "\<undef\>" nextgroup=rubyFunction skipwhite skipnl
+ syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl
+ syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl
+
+ syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold
+ syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold
+ syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold
+
+ " modifiers
+ syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display
+ syn match rubyRepeatModifier "\<\%(while\|until\)\>" display
+
+ syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
+ " curly bracket block or hash literal
+ syn region rubyCurlyBlock start="{" end="}" contains=ALLBUT,@rubyNotTop fold
+ syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold
+
+ " statements without 'do'
+ syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
+ syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold
+ syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\<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="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop
+ syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold
+
+ if !exists("ruby_minlines")
+ let ruby_minlines = 50
+ endif
+ exec "syn sync minlines=" . ruby_minlines
+
+else
+ syn match rubyControl "\<def\>[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl
+ syn match rubyControl "\<class\>[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl
+ syn match rubyControl "\<module\>[?!]\@!" 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 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 "\<include\>[?!]\@!"
+ syn keyword rubyInclude autoload extend load 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 contained
+syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell
+if !exists("ruby_no_comment_fold")
+ syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend
+ syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\%(\s.*\)\=$" contains=rubySpaceError,rubyTodo,@Spell fold
+else
+ syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell
+endif
+
+" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|and\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\|module\|next\|nil\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(not\|or\|redo\|rescue\|retry\|return\|self\|super\|then\|true\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|BEGIN\|END\|__FILE__\|__LINE__\)\>" 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 "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|attr\|attr_accessor\|attr_reader\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(attr_writer\|autoload\|callcc\|catch\|caller\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(eval\|class_eval\|instance_eval\|module_eval\|exit\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fail\|fork\|include\|lambda\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(load\|loop\|private\|proc\|protected\)\>" transparent contains=NONE
+syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|require_relative\|raise\|throw\|trap\)\>" 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:
View
1  .vimrc
@@ -25,7 +25,6 @@ if !has("gui_running")
set t_Co=256
endif
-" make backspace work 'as normal' (non-vi style)
set backspace=2
set hlsearch
set history=100
View
34 setup.rb
@@ -9,37 +9,37 @@
@symlinks = ['.bashrc', '.gemrc', '.vim', '.vimrc', '.git', '.gitconfig', '.inputrc', '.gitignore']
unless (['setup.rb', '.vimrc', '.inputrc'] - @stash.children.map{|c| c.basename.to_s}).empty? && @stash != @home then
- raise RuntimeError, "Not in stash"
+ raise RuntimeError, "Not in stash"
end
def overwrite_file(file)
- agree("=> Overwrite '#{@home}/#{file}'? ")
+ agree("=> Overwrite '#{@home}/#{file}'? ")
end
def symlink_file(stash_file)
- file = stash_file.basename
- home_file = @home + file
- if home_file.exist? || home_file.symlink? then
- if overwrite_file(file) then
- home_file.directory? ? home_file.rmtree : home_file.unlink
- else
- return
- end
- end
- home_file.make_symlink stash_file
- puts " #{home_file} -> #{stash_file}"
+ file = stash_file.basename
+ home_file = @home + file
+ if home_file.exist? || home_file.symlink? then
+ if overwrite_file(file) then
+ home_file.directory? ? home_file.rmtree : home_file.unlink
+ else
+ return
+ end
+ end
+ home_file.make_symlink stash_file
+ puts " #{home_file} -> #{stash_file}"
end
unless @tmp.exist? then
- # Make temporary directory
- puts "Creating temporary directory..."
- @tmp.mkdir
+ # Make temporary directory
+ puts "Creating temporary directory..."
+ @tmp.mkdir
end
puts "Symlinking stash files..."
@symlinks.each do |s|
- symlink_file(@stash + s)
+ symlink_file(@stash + s)
end
puts "Done."
Please sign in to comment.
Something went wrong with that request. Please try again.