0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.1b

This commit is contained in:
Bram Moolenaar
2007-05-10 16:56:30 +00:00
parent f1dc4965b5
commit c1762ccb6f
9 changed files with 189 additions and 174 deletions

View File

@@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files. " Vim autoload file for editing compressed files.
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2006 Oct 09 " Last Change: 2007 May 10
" These functions are used by the gzip plugin. " These functions are used by the gzip plugin.
@@ -63,6 +63,12 @@ fun gzip#read(cmd)
" set 'modifiable' " set 'modifiable'
let ma_save = &ma let ma_save = &ma
setlocal ma setlocal ma
" Reset 'foldenable', otherwise line numbers get adjusted.
if has("folding")
let fen_save = &fen
setlocal nofen
endif
" when filtering the whole buffer, it will become empty " when filtering the whole buffer, it will become empty
let empty = line("'[") == 1 && line("']") == line("$") let empty = line("'[") == 1 && line("']") == line("$")
let tmp = tempname() let tmp = tempname()
@@ -74,42 +80,50 @@ fun gzip#read(cmd)
if !filereadable(tmp) if !filereadable(tmp)
" uncompress didn't work! Keep the compressed file then. " uncompress didn't work! Keep the compressed file then.
echoerr "Error: Could not read uncompressed file" echoerr "Error: Could not read uncompressed file"
return let ok = 0
endif
" delete the compressed lines; remember the line number
let l = line("'[") - 1
if exists(":lockmarks")
lockmarks '[,']d _
else else
'[,']d _ let ok = 1
endif " delete the compressed lines; remember the line number
" read in the uncompressed lines "'[-1r tmp" let l = line("'[") - 1
" Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options. if exists(":lockmarks")
setlocal nobin lockmarks '[,']d _
if exists(":lockmarks")
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp
else else
execute "silent lockmarks " . l . "r " . tmp '[,']d _
endif endif
else " read in the uncompressed lines "'[-1r tmp"
execute "silent " . l . "r " . tmp " Use ++edit if the buffer was empty, keep the 'ff' and 'fenc' options.
setlocal nobin
if exists(":lockmarks")
if empty
execute "silent lockmarks " . l . "r ++edit " . tmp
else
execute "silent lockmarks " . l . "r " . tmp
endif
else
execute "silent " . l . "r " . tmp
endif
" if buffer became empty, delete trailing blank line
if empty
silent $delete _
1
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp
silent! exe "bwipe " . tmpe
endif endif
" if buffer became empty, delete trailing blank line " Restore saved option values.
if empty
silent $delete _
1
endif
" delete the temp file and the used buffers
call delete(tmp)
silent! exe "bwipe " . tmp
silent! exe "bwipe " . tmpe
let &pm = pm_save let &pm = pm_save
let &cpo = cpo_save let &cpo = cpo_save
let &l:ma = ma_save let &l:ma = ma_save
if has("folding")
let &l:fen = fen_save
endif
" When uncompressed the whole buffer, do autocommands " When uncompressed the whole buffer, do autocommands
if empty if ok && empty
if &verbose >= 8 if &verbose >= 8
execute "doau BufReadPost " . expand("%:r") execute "doau BufReadPost " . expand("%:r")
else else

View File

@@ -1,7 +1,9 @@
" Author: Mikolaj Machowski, Thomas Bartel
" Last change: 2007 May 8
let g:xmldata_xsl = { let g:xmldata_xsl = {
\ 'apply-imports' : [[], {}], \ 'apply-imports' : [[], {}],
\ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}], \ 'apply-templates' : [['sort', 'with-param'], {'select' : [], 'mode' : []}],
\ 'attribute' : [[], {'name' : [], 'namespace' : []}], \ 'attribute' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : []}],
\ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}], \ 'attribute-set' : [['attribute'], {'name' : [], 'use-attribute-sets' : []}],
\ 'call-template' : [['with-param'], {'name' : []}], \ 'call-template' : [['with-param'], {'name' : []}],
\ 'choose' : [['when', 'otherwise'], {}], \ 'choose' : [['when', 'otherwise'], {}],
@@ -9,10 +11,10 @@ let g:xmldata_xsl = {
\ 'copy' : [[], {'use-attribute-sets' : []}], \ 'copy' : [[], {'use-attribute-sets' : []}],
\ 'copy-of' : [[], {'select' : []}], \ 'copy-of' : [[], {'select' : []}],
\ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}], \ 'decimal-format' : [[], {'name' : [], 'decimal-separator' : [], 'grouping-separator' : [], 'infinity' : [], 'minus-sign' : [], 'NaN' : [], 'percent' : [], 'per-mille' : [], 'zero-digit' : [], 'digit' : [], 'pattern-separator' : []}],
\ 'element' : [[], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}], \ 'element' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'namespace' : [], 'use-attribute-sets' : []}],
\ 'fallback' : [[], {}], \ 'fallback' : [[], {}],
\ 'for-each' : [['sort'], {'select' : []}], \ 'for-each' : [['sort'], {'select' : []}],
\ 'if' : [[], {'test' : []}], \ 'if' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'test' : []}],
\ 'import' : [[], {'href' : []}], \ 'import' : [[], {'href' : []}],
\ 'include' : [[], {'href' : []}], \ 'include' : [[], {'href' : []}],
\ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}], \ 'key' : [[], {'name' : [], 'match' : [], 'use' : []}],
@@ -21,17 +23,16 @@ let g:xmldata_xsl = {
\ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}], \ 'number' : [[], {'level' : ['single', 'multiple', 'any'], 'count' : [], 'from' : [], 'value' : [], 'format' : [], 'lang' : [], 'letter-value' : ['alphabetic', 'traditional'], 'grouping-separator' : [], 'grouping-size' : []}],
\ 'otherwise' : [[], {}], \ 'otherwise' : [[], {}],
\ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}], \ 'output' : [[], {'method' : ['xml', 'html', 'text'], 'version' : [], 'encoding' : [], 'omit-xml-declaration' : ['yes', 'no'], 'standalone' : ['yes', 'no'], 'doctype-public' : [], 'doctype-system' : [], 'cdata-section-elements' : [], 'indent' : ['yes', 'no'], 'media-type' : []}],
\ 'param' : [[], {'name' : [], 'select' : []}], \ 'param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
\ 'preserve-space' : [[], {'elements' : []}], \ 'preserve-space' : [[], {'elements' : []}],
\ 'processing-instruction' : [[], {'name' : []}], \ 'processing-instructionruction' : [[], {'name' : []}],
\ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}], \ 'sort' : [[], {'select' : [], 'lang' : [], 'data-type' : ['text', 'number'], 'order' : ['ascending', 'descending'], 'case-order' : ['upper-first', 'lower-first']}],
\ 'strip-space' : [[], {'elements' : []}], \ 'strip-space' : [[], {'elements' : []}],
\ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}], \ 'stylesheet' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'version' : []}],
\ 'template' : [['param'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}], \ 'template' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'match' : [], 'name' : [], 'priority' : [], 'mode' : []}],
\ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}], \ 'text' : [[], {'disable-output-escaping' : ['yes', 'no']}],
\ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}], \ 'transform' : [['import', 'attribute-set', 'decimal-format', 'include', 'key', 'namespace-alias', 'output', 'param', 'preserve-space', 'strip-space', 'template'], {'id' : [], 'extension-element-prefixes' : [], 'exclude-result-prefixes' : [], 'version' : []}],
\ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}], \ 'value-of' : [[], {'select' : [], 'disable-output-escaping' : ['yes', 'no']}],
\ 'variable' : [[], {'name' : [], 'select' : []}], \ 'variable' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}],
\ 'when' : [[], {'test' : []}], \ 'when' : [[], {'test' : []}],
\ 'with-param' : [[], {'name' : [], 'select' : []}]} \ 'with-param' : [['apply-imports', 'apply-templates', 'attribute', 'call-template', 'choose', 'comment', 'copy', 'copy-of', 'element', 'fallback', 'for-each', 'if', 'message', 'number', 'processing-instruction', 'text', 'value-of', 'variable'], {'name' : [], 'select' : []}]}

View File

@@ -1,4 +1,4 @@
*map.txt* For Vim version 7.1a. Last change: 2007 Mar 24 *map.txt* For Vim version 7.1b. Last change: 2007 May 07
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar
@@ -792,7 +792,7 @@ stands for. This can be used to save typing for often used long words. And
you can use it to automatically correct obvious spelling errors. you can use it to automatically correct obvious spelling errors.
Examples: Examples:
:iab ms MicroSoft :iab ms Microsoft
:iab tihs this :iab tihs this
There are three types of abbreviations: There are three types of abbreviations:

View File

@@ -1,4 +1,4 @@
*usr_03.txt* For Vim version 7.1a. Last change: 2006 Jun 21 *usr_03.txt* For Vim version 7.1b. Last change: 2006 Jun 21
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*usr_43.txt* For Vim version 7.1a. Last change: 2006 Apr 24 *usr_43.txt* For Vim version 7.1b. Last change: 2006 Apr 24
VIM USER MANUAL - by Bram Moolenaar VIM USER MANUAL - by Bram Moolenaar

View File

@@ -1,4 +1,4 @@
*version5.txt* For Vim version 7.1a. Last change: 2006 Nov 18 *version5.txt* For Vim version 7.1b. Last change: 2006 Nov 18
VIM REFERENCE MANUAL by Bram Moolenaar VIM REFERENCE MANUAL by Bram Moolenaar

View File

@@ -11,11 +11,7 @@
" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) " Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN)
" ---------------------------------------------------------------------------- " ----------------------------------------------------------------------------
" For version 5.x: Clear all syntax items if exists("b:current_syntax")
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish finish
endif endif
@@ -34,9 +30,9 @@ endif
" Operators " Operators
if exists("ruby_operators") if exists("ruby_operators")
syn match rubyOperator "\%(\^\|\~\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|>\||\|-\|/\|\*\*\|\*\|&\|%\|+\)" syn match rubyOperator "\%([~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::\)"
syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&\|&=\|&&=\|||\||=\|||=\|%=\|+=\|!\~\|!=\)" syn match rubyPseudoOperator "\%(-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\)"
syn region rubyBracketOperator matchgroup=rubyOperator start="\%([_[:lower:]]\w*[?!=]\=\|}\)\@<=\[\s*" end="\s*]" syn region rubyBracketOperator matchgroup=rubyOperator start="\%([_[:lower:]]\w*[?!=]\=\|[})]\)\@<=\[\s*" end="\s*]" contains=TOP
endif endif
" Expression Substitution and Backslash Notation " Expression Substitution and Backslash Notation
@@ -46,22 +42,29 @@ syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)
syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=TOP syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=TOP
syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable
syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained 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 region rubyNoInterpolation start="\\#{" end="}" contained
syn match rubyNoInterpolation "\\#{" display contained syn match rubyNoInterpolation "\\#{" display contained
syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
syn match rubyNoInterpolation "\\#\$\W" display contained
syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE
syn region rubyNestedParentheses start="(" end=")" skip="\\\\\|\\)" transparent contained contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape syn region rubyNestedParentheses start="(" end=")" skip="\\\\\|\\)" transparent contained contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape
syn region rubyNestedCurlyBraces start="{" end="}" skip="\\\\\|\\}" transparent contained contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape syn region rubyNestedCurlyBraces start="{" end="}" skip="\\\\\|\\}" transparent contained contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape
syn region rubyNestedAngleBrackets start="<" end=">" skip="\\\\\|\\>" transparent contained contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape syn region rubyNestedAngleBrackets start="<" end=">" skip="\\\\\|\\>" transparent contained contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape
syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape if exists("ruby_operators")
syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape
else
syn region rubyNestedSquareBrackets start="\[" end="\]" skip="\\\\\|\\\]" transparent containedin=rubyArrayLiteral contained contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape
endif
syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyEscape syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyEscape
syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets
" Numbers and ASCII Codes " 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 rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
syn match rubyInteger "\<0[xX]\x\+\%(_\x\+\)*\>" display syn match rubyInteger "\<0[xX]\x\+\%(_\x\+\)*\>" display
syn match rubyInteger "\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display syn match rubyInteger "\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
syn match rubyInteger "\<0[oO]\=\o\+\%(_\o\+\)*\>" display syn match rubyInteger "\<0[oO]\=\o\+\%(_\o\+\)*\>" display
@@ -77,17 +80,17 @@ syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\
syn match rubyClassVariable "@@\h\w*" display syn match rubyClassVariable "@@\h\w*" display
syn match rubyInstanceVariable "@\h\w*" display syn match rubyInstanceVariable "@\h\w*" display
syn match rubyGlobalVariable "$\%(\h\w*\|-.\)" syn match rubyGlobalVariable "$\%(\h\w*\|-.\)"
syn match rubySymbol ":\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|==\|=\~\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
syn match rubySymbol ":\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
syn match rubySymbol ":\@<!:\%(\$\|@@\=\)\=\h\w*[?!=]\=" syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\h\w*"
syn region rubySymbol start=":\@<!:\"" end="\"" skip="\\\\\|\\\"" syn match rubySymbol "[]})\"':]\@<!:\h\w*[?!=]\="
syn region rubySymbol start=":\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\""
if exists("ruby_operators") syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
syn match rubyBlockParameter "\%(\%(\%(\<do\>\|{\)\s*\)|\s*\)\@<=[( ,a-zA-Z0-9_*)]\+\%(\s*|\)\@=" display
else
syn match rubyBlockParameter "\%(\%(\<do\>\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display
endif
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:;<=>?@\`~1-9]# syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]#
syn match rubyPredefinedVariable "$_\>" display syn match rubyPredefinedVariable "$_\>" display
syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display
@@ -101,8 +104,8 @@ syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_VERSI
"syn match rubyPredefinedConstant "\%(::\)\=\zs\%(NotImplementError\)\>" "syn match rubyPredefinedConstant "\%(::\)\=\zs\%(NotImplementError\)\>"
" Normal Regular Expression " Normal Regular Expression
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[>]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\<\%(split\|scan\|gsub\|sub\)\s*\)\@<=/" end="/[iomx]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\<\%(split\|scan\|gsub\|sub\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyStringSpecial fold
" Normal String and Shell Command Output " 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=@rubyStringSpecial fold
@@ -110,18 +113,23 @@ syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\
syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold
" Generalized Regular Expression " Generalized Regular Expression
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomx]*" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomx]*" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomx]*" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomx]*" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold
syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomx]*" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold
" Generalized Single Quoted String, Symbol and Array of Strings " Generalized Single Quoted String, Symbol and Array of Strings
syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape
syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape
syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape
syn region rubyString matchgroup=rubyStringDelimiter start="%[qsw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape syn region rubyString matchgroup=rubyStringDelimiter start="%[qw](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape
syn region rubySymbol start="%[s]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold
syn region rubySymbol start="%[s]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape
syn region rubySymbol start="%[s]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape
syn region rubySymbol start="%[s]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape
syn region rubySymbol start="%[s](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape
" Generalized Double Quoted String and Array of Strings and Shell Command Output " 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 " Note: %= is not matched here as the beginning of a double quoted string
@@ -133,20 +141,20 @@ syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=\[" e
syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold syn region rubyString matchgroup=rubyStringDelimiter start="%[QWx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold
" Here Document " Here Document
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs\%(\h\w*\)+ end=+$+ oneline contains=TOP syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\h\w*\)+ end=+$+ oneline contains=TOP
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=TOP syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=TOP
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=TOP syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=TOP
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=TOP syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=TOP
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<\z(\h\w*\)\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<"\z([^"]*\)"\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<'\z([^']*\)'\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart fold keepend
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<`\z([^`]*\)`\ze+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-\z(\h\w*\)\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-"\z([^"]*\)"\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-'\z([^']*\)'\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend
syn region rubyString start=+\%(\%(class\s*\|\%(\.\|::\)\)\_s*\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend syn region rubyString start=+\%(\%(class\s*\|\%([]}).]\|::\)\)\_s*\|\w\)\@<!<<-`\z([^`]*\)`\ze+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend
if exists('main_syntax') && main_syntax == 'eruby' if exists('main_syntax') && main_syntax == 'eruby'
let b:ruby_no_expensive = 1 let b:ruby_no_expensive = 1
@@ -160,7 +168,9 @@ syn match rubyModuleDeclaration "[^[:space:];#]\+" contained contains=rubyC
syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:].:?!=]\@!" contained containedin=rubyMethodDeclaration syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:].:?!=]\@!" contained containedin=rubyMethodDeclaration
syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2
syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|==\|=\~\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration
" Expensive Mode - colorize *end* according to opening statement
" 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") if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl
syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl
@@ -171,25 +181,25 @@ if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive")
syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=TOP fold syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=TOP fold
" modifiers " modifiers
syn match rubyConditional "\<\%(if\|unless\)\>" display syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display
syn match rubyRepeat "\<\%(while\|until\)\>" display syn match rubyRepeatModifier "\<\%(while\|until\)\>" display
" *do* requiring *end*
syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=TOP fold syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=TOP fold
" curly bracket block or hash literal
syn region rubyCurlyBlock start="{" end="}" contains=TOP fold
syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=TOP fold
" *{* requiring *}* " statements without 'do'
syn region rubyCurlyBlock start="{" end="}" contains=TOP fold syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=TOP fold
syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=TOP fold
syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!?]\)\s*\)\@<=\%(if\|unless\)\>" end="\<end\>" contains=TOP fold
" statements without *do* syn keyword rubyConditional then else when contained containedin=rubyCaseExpression
syn region rubyNoDoBlock matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=TOP fold syn keyword rubyConditional then else elsif contained containedin=rubyConditionalExpression
syn region rubyCaseBlock matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=TOP fold
syn region rubyConditionalBlock matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\%(if\|unless\)\>" end="\<end\>" contains=TOP fold
syn keyword rubyConditional then else when contained containedin=rubyCaseBlock
syn keyword rubyConditional then else elsif contained containedin=rubyConditionalBlock
" statement with optional *do* " statements with optional 'do'
syn region rubyOptDoLine matchgroup=rubyRepeat start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" end="\%(\<do\>\|:\)" end="\ze\%(;\|$\)" oneline contains=TOP syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=TOP
syn region rubyOptDoBlock start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=TOP nextgroup=rubyOptDoLine fold syn region rubyRepeatExpression start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=TOP nextgroup=rubyOptionalDoLine fold
if !exists("ruby_minlines") if !exists("ruby_minlines")
let ruby_minlines = 50 let ruby_minlines = 50
@@ -227,11 +237,11 @@ endif
" Comments and Documentation " Comments and Documentation
syn match rubySharpBang "\%^#!.*" display syn match rubySharpBang "\%^#!.*" display
syn keyword rubyTodo FIXME NOTE TODO XXX contained syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX contained
syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell
if !exists("ruby_no_comment_fold") 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 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\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell fold syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell fold
else else
syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell
endif endif
@@ -252,72 +262,62 @@ syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|rai
" __END__ Directive " __END__ Directive
syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold
" Define the default highlighting. hi def link rubyClass rubyDefine
" For version 5.7 and earlier: only when not done already hi def link rubyModule rubyDefine
" For version 5.8 and later: only when an item doesn't have highlighting yet hi def link rubyDefine Define
if version >= 508 || !exists("did_ruby_syntax_inits") hi def link rubyFunction Function
if version < 508 hi def link rubyConditional Conditional
let did_ruby_syntax_inits = 1 hi def link rubyConditionalModifier rubyConditional
command -nargs=+ HiLink hi link <args> hi def link rubyRepeat Repeat
else hi def link rubyRepeatModifier rubyRepeat
command -nargs=+ HiLink hi def link <args> hi def link rubyOptionalDo rubyRepeat
endif hi def link rubyControl Statement
hi def link rubyInclude Include
HiLink rubyClass rubyDefine hi def link rubyInteger Number
HiLink rubyModule rubyDefine hi def link rubyASCIICode Character
HiLink rubyDefine Define hi def link rubyFloat Float
HiLink rubyFunction Function hi def link rubyBoolean Boolean
HiLink rubyConditional Conditional hi def link rubyException Exception
HiLink rubyRepeat Repeat if !exists("ruby_no_identifiers")
HiLink rubyControl Statement hi def link rubyIdentifier Identifier
HiLink rubyInclude Include else
HiLink rubyInteger Number hi def link rubyIdentifier NONE
HiLink rubyASCIICode Character
HiLink rubyFloat Float
HiLink rubyBoolean Boolean
HiLink rubyException Exception
if !exists("ruby_no_identifiers")
HiLink rubyIdentifier Identifier
else
HiLink rubyIdentifier NONE
endif
HiLink rubyClassVariable rubyIdentifier
HiLink rubyConstant Type
HiLink rubyGlobalVariable rubyIdentifier
HiLink rubyBlockParameter rubyIdentifier
HiLink rubyInstanceVariable rubyIdentifier
HiLink rubyPredefinedIdentifier rubyIdentifier
HiLink rubyPredefinedConstant rubyPredefinedIdentifier
HiLink rubyPredefinedVariable rubyPredefinedIdentifier
HiLink rubySymbol Constant
HiLink rubyKeyword Keyword
HiLink rubyOperator Operator
HiLink rubyPseudoOperator rubyOperator
HiLink rubyBeginEnd Statement
HiLink rubyAccess Statement
HiLink rubyAttribute Statement
HiLink rubyEval Statement
HiLink rubyPseudoVariable Constant
HiLink rubyComment Comment
HiLink rubyData Comment
HiLink rubyDataDirective Delimiter
HiLink rubyDocumentation Comment
HiLink rubyEscape Special
HiLink rubyInterpolationDelimiter Delimiter
HiLink rubyNoInterpolation rubyString
HiLink rubySharpBang PreProc
HiLink rubyRegexpDelimiter rubyStringDelimiter
HiLink rubyStringDelimiter Delimiter
HiLink rubyRegexp rubyString
HiLink rubyString String
HiLink rubyTodo Todo
HiLink rubyError Error
HiLink rubySpaceError rubyError
delcommand HiLink
endif 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 rubyPseudoOperator rubyOperator
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 rubyEscape Special
hi def link rubyInterpolationDelimiter Delimiter
hi def link rubyNoInterpolation rubyString
hi def link rubySharpBang PreProc
hi def link rubyRegexpDelimiter rubyStringDelimiter
hi def link rubyStringDelimiter Delimiter
hi def link rubyRegexp rubyString
hi def link rubyString String
hi def link rubyTodo Todo
hi def link rubyInvalidVariable Error
hi def link rubyError Error
hi def link rubySpaceError rubyError
let b:current_syntax = "ruby" let b:current_syntax = "ruby"

View File

@@ -1240,7 +1240,7 @@ do_cmdline(cmdline, getline, cookie, flags)
trylevel = initial_trylevel + cstack.cs_trylevel; trylevel = initial_trylevel + cstack.cs_trylevel;
/* /*
* If the outermost try conditional (accross function calls and sourced * If the outermost try conditional (across function calls and sourced
* files) is aborted because of an error, an interrupt, or an uncaught * files) is aborted because of an error, an interrupt, or an uncaught
* exception, cancel everything. If it is left normally, reset * exception, cancel everything. If it is left normally, reset
* force_abort to get the non-EH compatible abortion behavior for * force_abort to get the non-EH compatible abortion behavior for
@@ -1593,8 +1593,8 @@ getline_equal(fgetline, cookie, func)
struct loop_cookie *cp; struct loop_cookie *cp;
/* When "fgetline" is "get_loop_line()" use the "cookie" to find the /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
* function that's orignally used to obtain the lines. This may be nested * function that's originally used to obtain the lines. This may be
* several levels. */ * nested several levels. */
gp = fgetline; gp = fgetline;
cp = (struct loop_cookie *)cookie; cp = (struct loop_cookie *)cookie;
while (gp == get_loop_line) while (gp == get_loop_line)
@@ -1624,7 +1624,7 @@ getline_cookie(fgetline, cookie)
struct loop_cookie *cp; struct loop_cookie *cp;
/* When "fgetline" is "get_loop_line()" use the "cookie" to find the /* When "fgetline" is "get_loop_line()" use the "cookie" to find the
* cookie that's orignally used to obtain the lines. This may be nested * cookie that's originally used to obtain the lines. This may be nested
* several levels. */ * several levels. */
gp = fgetline; gp = fgetline;
cp = (struct loop_cookie *)cookie; cp = (struct loop_cookie *)cookie;

View File

@@ -33,7 +33,7 @@
# define HAVE_PATHDEF # define HAVE_PATHDEF
/* /*
* Check if configure correcly managed to find sizeof(int). If this failed, * Check if configure correctly managed to find sizeof(int). If this failed,
* it becomes zero. This is likely a problem of not being able to run the * it becomes zero. This is likely a problem of not being able to run the
* test program. Other items from configure may also be wrong then! * test program. Other items from configure may also be wrong then!
*/ */
@@ -42,7 +42,7 @@
# endif # endif
/* /*
* Cygwin may have fchdir() in a newer rleease, but in most versions it * Cygwin may have fchdir() in a newer release, but in most versions it
* doesn't work well and avoiding it keeps the binary backward compatible. * doesn't work well and avoiding it keeps the binary backward compatible.
*/ */
# if defined(__CYGWIN32__) && defined(HAVE_FCHDIR) # if defined(__CYGWIN32__) && defined(HAVE_FCHDIR)