On 10/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote:
Kevin Old wrote:
> Hello all,
> I'm using the xml.vim plugin
> (http://www.vim.org/scripts/script.php?script_id=1397) and have it
> working well, but am trying to set a percent tag <% %> (used with
> HTML::Mason) as an emptytag.
> Here's the line in my .vimrc:
> All of the tags act as they should and do not try to close except for
> some weird issue with the % tag.
> Here's what happens. In HTML::Mason code I can print a variable like
> this <% $variable %>. This works fine. But if I try to use this with
> an object there is a problem.
> I type the following:
> <% $obj->
> but when I enter the ">" xml.vim adds a closing tag, so it now looks
> like this:
> <% $obj-></%>
> It shouldn't add the </%> as % is in the emptytags definition above.
> I can't seem to figure out why this is happening.
> Any help is appreciated!
The > of -> is seen as ending the (opening) <% tag, and since it is preceded
by neither / nor % the plugin thinks that a closing tag is missing.
Try using <% $obj-> instead (i.e. replacing > by >). Then you will enter
%> somewhat later on, to end the tag.
I can't use > in place of the > - I'm writing perl, not html. The
<% %> tags basically do a "print $obj->obj_var" for me if I used it
like this <% $obj->obj_var %>.