Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Highlight unicode characters in constants

Except those which are the first letter (e.g. `Ír`), as Ruby does not
recognize them as valid constants. (See also #138)
  • Loading branch information...
1 parent b60da6c commit ab7c7e4cc3c4ac235cebcb4b2495ebdd0d67fdc0 @amarshall amarshall committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  syntax/ruby.vim
2  syntax/ruby.vim
@@ -92,7 +92,7 @@ syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*
syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent
-syn match rubyConstant "\%(\%(^\|[^.]\)\.\_s*\)\@<!\<\u\w*\>\%(\s*(\)\@!"
+syn match rubyConstant "\%(\%(^\|[^.]\)\.\_s*\)\@<!\<\u\%(\w\|[^\x00-\x7F]\)*\>\%(\s*(\)\@!"
syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display
syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)"

0 comments on commit ab7c7e4

Please sign in to comment.
Something went wrong with that request. Please try again.