On Thu, Jul 17, 2008 at 02:27:56PM +0200, Nikolai Weibull wrote:
> 
> On Thu, Jul 17, 2008 at 12:30, Richard Hartmann
> <[EMAIL PROTECTED]> wrote:
> 
> > Syntax elements are detected & highlighted in the wrong places.
> 
> > Two examples I have known for some time but never got around to
> > do much about them are:
> 
> Posting sooner rather than later is always better.  That almost rhymes.

I'll jump in here and post a problem I've been meaning to contact you
about, as well.

   somecommand <<< $somevar
   othercommand

Zsh's "here-string" is triggering the here-doc syntax highlighting and
therefore causes all of the remaining script to be highlighted as a
string.  The attached patch fixes the problem.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>
diff --git a/runtime/syntax/zsh.vim b/runtime/syntax/zsh.vim
index eb19eba..e679b21 100644
--- a/runtime/syntax/zsh.vim
+++ b/runtime/syntax/zsh.vim
@@ -49,12 +49,12 @@ syn match   zshRedir            '\d\=\(<\|<>\|<<<\|<&\s*[0-9p-]\=\)'
 syn match   zshRedir            '\d\=\(>\|>>\|>&\s*[0-9p-]\=\|&>\|>>&\|&>>\)[|!]\='
 syn match   zshRedir            '|&\='
 
-syn region  zshHereDoc          matchgroup=zshRedir start='<<\s*\z(\S*\)'
+syn region  zshHereDoc          matchgroup=zshRedir start='<\@<!<<<[EMAIL PROTECTED](\S*\)'
                                 \ end='^\z1\>' [EMAIL PROTECTED]
 syn region  zshHereDoc          matchgroup=zshRedir start='<<-\s*\z(\S*\)'
                                 \ end='^\s*\z1\>' [EMAIL PROTECTED]
 syn region  zshHereDoc          matchgroup=zshRedir
-                                \ start=+<<\s*\(["']\)\z(\S*\)\1+  end='^\z1\>'
+                                \ start=+<\@<!<<<[EMAIL PROTECTED](["']\)\z(\S*\)\1+  end='^\z1\>'
 syn region  zshHereDoc          matchgroup=zshRedir
                                 \ start=+<<-\s*\(["']\)\z(\S*\)\1+
                                 \ end='^\s*\z1\>'

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui