Skip to content

Commit

Permalink
highlight interpolation regions preceded by multiple backslashes prop…
Browse files Browse the repository at this point in the history
…erly
  • Loading branch information
dkearns committed Feb 26, 2007
1 parent 9a0d742 commit d23b6c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2007-02-26 Doug Kearns <dougkearns@gmail.com>

* syntax/ruby.vim: highlight interpolation regions preceded by
multiple backslashes properly

2007-02-26 Doug Kearns <dougkearns@gmail.com>

* syntax/ruby.vim: highlight methods named "end" when the definition
Expand Down
3 changes: 2 additions & 1 deletion syntax/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,11 @@ endif
" Expression Substitution and Backslash Notation
syn match rubyEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
syn match rubyEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
syn region rubyInterpolated matchgroup=rubyInterpolation start="\\\@<!#{" end="}" contains=TOP contained
syn region rubyInterpolated matchgroup=rubyInterpolation start="#{" end="}" contains=TOP contained
"syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" contained contains=rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable display
syn match rubyInterpolation "#\ze\%(\$\|@@\=\)\w\+" contained display nextgroup=rubyClassVariable,rubyInstanceVariable,rubyGlobalVariable
syn region rubyNoInterpolation start="\\#{" end="}" contained
syn match rubyNoInterpolation "\\#{" contained display
syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" contained display

syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE
Expand Down

0 comments on commit d23b6c6

Please sign in to comment.