Skip to content

Commit f517c02

Browse files
committed
Highlight negative sign; remove Vim 5.x stuff
1 parent 735a355 commit f517c02

3 files changed

Lines changed: 13 additions & 19 deletions

File tree

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2007-09-06 Tim Pope <vim@tpope.info>
2+
3+
* syntax/eruby.vim: remove Vim 5.x specific sections
4+
* syntax/ruby.vim: highlight negative sign in numbers
5+
16
2007-08-07 Tim Pope <vim@tpope.info>
27

38
* indent/ruby.vim: fix while/until/for match in skip regexp

syntax/eruby.vim

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,10 @@ exe 'syn region erubyExpression matchgroup=erubyDelimiter start="<%\{1,'.b:erub
6161
exe 'syn region erubyComment matchgroup=erubyDelimiter start="<%\{1,'.b:eruby_nest_level.'\}#" end="-\=%\@<!%\{1,'.b:eruby_nest_level.'\}>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend'
6262

6363
" Define the default highlighting.
64-
" For version 5.7 and earlier: only when not done already
65-
" For version 5.8 and later: only when an item doesn't have highlighting yet
66-
if version >= 508 || !exists("did_eruby_syntax_inits")
67-
if version < 508
68-
let did_ruby_syntax_inits = 1
69-
command -nargs=+ HiLink hi link <args>
70-
else
71-
command -nargs=+ HiLink hi def link <args>
72-
endif
7364

74-
HiLink erubyDelimiter Delimiter
75-
HiLink erubyComment Comment
65+
hi def link erubyDelimiter Delimiter
66+
hi def link erubyComment Comment
7667

77-
delcommand HiLink
78-
endif
7968
let b:current_syntax = 'eruby'
8069

8170
if main_syntax == 'eruby'

syntax/ruby.vim

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedPare
6363

6464
" Numbers and ASCII Codes
6565
syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)"
66-
syn match rubyInteger "\<0[xX]\x\+\%(_\x\+\)*\>" display
67-
syn match rubyInteger "\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
68-
syn match rubyInteger "\<0[oO]\=\o\+\%(_\o\+\)*\>" display
69-
syn match rubyInteger "\<0[bB][01]\+\%(_[01]\+\)*\>" display
70-
syn match rubyFloat "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display
71-
syn match rubyFloat "\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display
66+
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display
67+
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display
68+
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display
69+
syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display
70+
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display
71+
syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display
7272

7373
" Identifiers
7474
syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent

0 commit comments

Comments
 (0)