From fc667d06bed356b85f0589d45f6aa1abdcea631b Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 29 Jun 2008 04:33:40 +0000 Subject: [PATCH] revert highlighting of - as number --- ChangeLog | 4 ++++ syntax/ruby.vim | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3030ec50..945d2b0a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-06-29 Tim Pope + + * syntax/ruby.vim: revert highlighting of - as number + 2008-06-29 Tim Pope * indent/eruby.vim: fix quirk in optional argument handling diff --git a/syntax/ruby.vim b/syntax/ruby.vim index b23ab5fd..a5a118e4 100644 --- a/syntax/ruby.vim +++ b/syntax/ruby.vim @@ -82,12 +82,12 @@ syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,ru " Numbers and ASCII Codes syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display -syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@" display +syn match rubyInteger "\<0[xX]\x\+\%(_\x\+\)*\>" display +syn match rubyInteger "\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display +syn match rubyInteger "\<0[oO]\=\o\+\%(_\o\+\)*\>" display +syn match rubyInteger "\<0[bB][01]\+\%(_[01]\+\)*\>" display +syn match rubyFloat "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display +syn match rubyFloat "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display " Identifiers syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent