From 60a795aad6ade281146a5343b416f21825af5364 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Fri, 16 Sep 2005 21:55:43 +0000 Subject: updated for version 7.0148 --- runtime/syntax/eruby.vim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/eruby.vim b/runtime/syntax/eruby.vim index 85b3cfb25..59f042d49 100644 --- a/runtime/syntax/eruby.vim +++ b/runtime/syntax/eruby.vim @@ -10,7 +10,6 @@ " but WITHOUT ANY WARRANTY; without even the implied warranty of " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the " GNU General Public License for more details. -" ---------------------------------------------------------------------------- " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded @@ -33,9 +32,12 @@ else syn include @rubyTop syntax/ruby.vim endif -syn region erubyOneLiner matchgroup=erubyDelimiter start="^\s*\zs%" end="$" contains=@rubyTop,erubyDelimiter keepend -syn region erubyBlock matchgroup=erubyDelimiter start="<%=\=" end="%>" contains=@rubyTop containedin=ALLBUT,erubyComment keepend -syn region erubyComment matchgroup=erubyDelimiter start="<%#" end="%>" keepend +syn cluster erubyRegions contains=erubyOneLiner,erubyBlock,erubyExpression,erubyComment + +syn region erubyOneLiner matchgroup=erubyDelimiter start="^%%\@!" end="$" contains=@rubyTop containedin=ALLBUT,@erubyRegions keepend oneline +syn region erubyBlock matchgroup=erubyDelimiter start="<%%\@!" end="%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions +syn region erubyExpression matchgroup=erubyDelimiter start="<%=" end="%>" contains=@rubyTop containedin=ALLBUT,@erubyRegions +syn region erubyComment matchgroup=erubyDelimiter start="<%#" end="%>" contains=rubyTodo,@Spell containedin=ALLBUT,@erubyRegions keepend " Define the default highlighting. " For version 5.7 and earlier: only when not done already @@ -59,4 +61,4 @@ if main_syntax == 'eruby' unlet main_syntax endif -" vim: sw=2 sts=2 ts=8 ff=unix nowrap: +" vim: nowrap sw=2 sts=2 ts=8 ff=unix: -- cgit v1.2.1