summaryrefslogtreecommitdiff
path: root/runtime/syntax/ruby.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-09-25 22:16:38 +0000
committerBram Moolenaar <Bram@vim.org>2005-09-25 22:16:38 +0000
commit1e01546026ce909b5fe56c05867f28e77d1b6eb3 (patch)
tree05ccef65c430097352670acbbeb5520d649ba841 /runtime/syntax/ruby.vim
parentbfd8fc0529f46612f7b3efca6c7b3305e70ac374 (diff)
downloadvim-git-1e01546026ce909b5fe56c05867f28e77d1b6eb3.tar.gz
updated for version 7.0150
Diffstat (limited to 'runtime/syntax/ruby.vim')
-rw-r--r--runtime/syntax/ruby.vim14
1 files changed, 7 insertions, 7 deletions
diff --git a/runtime/syntax/ruby.vim b/runtime/syntax/ruby.vim
index 0a00dfc5b..aba869763 100644
--- a/runtime/syntax/ruby.vim
+++ b/runtime/syntax/ruby.vim
@@ -79,10 +79,10 @@ syn region rubySymbol start=":\@<!:\"" end="\"" skip="\\\\\|\\\""
syn match rubyBlockParameter "\%(\%(\<do\>\|{\)\s*\)\@<=|\s*\zs[( ,a-zA-Z0-9_*)]\+\ze\s*|" display
syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~1-9]#
-syn match rubyPredefinedVariable "$_\>" display
-syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display
-syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
-syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOAD_PATH\|SAFE\|VERBOSE\)\>" 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\|RUBY_PLATFORM\|RUBY_RELEASE_DATE\)\>\%(\s*(\)\@!"
syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_VERSION\|STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
@@ -166,8 +166,8 @@ if !exists("ruby_no_expensive")
syn region rubyNoDoBlock matchgroup=rubyControl start="\<\%(case\|begin\)\>" start="\%(^\|\.\.\.\=\|[,;=([<>~\*/%!&^|+-]\)\s*\zs\%(if\|unless\)\>" end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo fold
" statement with optional *do*
- syn region rubyOptDoLine matchgroup=rubyControl start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\<\%(until\|while\)\>" end="\%(\<do\>\|:\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo
- syn region rubyOptDoBlock start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[,;=([<>~\*/%!&^|+-]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyControl end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo nextgroup=rubyOptDoLine fold
+ syn region rubyOptDoLine matchgroup=rubyControl start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[?:,;=([<>~\*/%!&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" end="\%(\<do\>\|:\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo
+ syn region rubyOptDoBlock start="\<for\>" start="\%(\%(^\|\.\.\.\=\|[:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyControl end="\<end\>" contains=ALLBUT,@rubyExtendedStringSpecial,rubyTodo nextgroup=rubyOptDoLine fold
if !exists("ruby_minlines")
let ruby_minlines = 50
@@ -196,7 +196,7 @@ syn keyword rubyBeginEnd BEGIN END
if !exists("ruby_no_special_methods")
syn keyword rubyAccess public protected private
syn keyword rubyAttribute attr attr_accessor attr_reader attr_writer
- syn keyword rubyControl abort at_exit exit fork loop trap
+ 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
syn keyword rubyInclude autoload extend include load require