On 12/11/08, Robert Mark Bram <[EMAIL PROTECTED]> wrote:
>
> Hi All,
>
> I am using using TagList for ANT build files as per
> http://vim.wikia.com/wiki/Using_TagList_for_ANT_build_files
>
> To pick up targets, I am using:
> --regex-ant=/^[ \t]*<[ \t]*target.*name="([^<"&]+)".*>/\1/t,target/i
>
> The problem is this will only pick up targets where the opening tag is
> all on one line. For example, it will pick up
>  <target name="clean" depends="init" description="...">
> but not
>  <target name="clean"
>       depends="init"
>       description="...">

The problem with the suggestions from others is this is NOT a vim regex.
This is executed by ctags.exe, so you have to use Perl reg
expressions, not Vim ones.

Maybe the ones provided do work with Perl, but I don't think so.

I am not certain what the equivalent of Vim's \_.* is in Perl.  Anyone?


As an alterative, do you really need to scan up to the closing >?

Just remove the closing > in the pattern.
--langdef=ant
--langmap=ant:.xml
--regex-ant=/^[ \t]*<[ \t]*project.*name="([^"]+)".*/\1/p,project/i
--regex-ant=/^[ \t]*<[ \t]*target.*name="([^"]+)".*/\1/t,target/i

And that should probably do it.
If so, let me know and I will update the Tip.

Dave

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

Reply via email to