2008/7/17 James Vega <[EMAIL PROTECTED]>:

> 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.

Fixed, although not using that exact patch.  See attached for complete
patch.  Bram, if you feel up to it, please apply.  I've tested every
possible combination.  I think.  Damn I hate testing exponential
cases.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

diff --git a/syntax/zsh.vim b/syntax/zsh.vim
index 6b7249b..ecd6f05 100644
--- a/syntax/zsh.vim
+++ b/syntax/zsh.vim
@@ -51,14 +51,23 @@ 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*\)'
-                                \ 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='<\@<!<<\s*\z([^<]\S*\)'
+                                \ end='^\z1\>'
+                                \ [EMAIL PROTECTED]
+syn region  zshHereDoc          matchgroup=zshRedir
+                                \ start='<\@<!<<\s*\\\z(\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\>'
 syn region  zshHereDoc          matchgroup=zshRedir
-                                \ start=+<<-\s*\(["']\)\z(\S*\)\1+
+                                \ start=+<\@<!<<-\s*\(["']\)\z(\S\+\)\1+
                                 \ end='^\s*\z1\>'
 
 syn match   zshVariable         '\<\h\w*' contained

Raspunde prin e-mail lui