Skip to content

Commit 55e8a7d

Browse files
justincampbelltpope
authored andcommitted
Make Foo and Foo() both highlight as constants
Closes vim-ruby#210.
1 parent 3e1e8cf commit 55e8a7d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

syntax/ruby.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ syn match rubySymbol "[]})\"':]\@<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)
103103
syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold
104104
syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold
105105

106+
syn match rubyCapitalizedMethod "\%(\%(^\|[^.]\)\.\s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)*\s*(\@="
107+
106108
syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained
107109
syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter
108110

@@ -336,6 +338,7 @@ hi def link rubyAccess Statement
336338
hi def link rubyAttribute Statement
337339
hi def link rubyEval Statement
338340
hi def link rubyPseudoVariable Constant
341+
hi def link rubyCapitalizedMethod rubyLocalVariableOrMethod
339342

340343
hi def link rubyComment Comment
341344
hi def link rubyData Comment

0 commit comments

Comments
 (0)