Christian Brabandt wrote:

> Hi oldcapecod!
> 
> (CC'ing HTML indent maintainer)
> 
> On Mo, 11 Feb 2013, oldcapecod wrote:
> 
> > OK, all that's needed is ...
> > 
> > filetype plugin indent on
> > 
> > in the .vimrc file.   
> 
> The indent html file causes this. There are actually two problems there. 
> 
> First the indent-expression already matches <img> tags, while it should 
> only match <i> tags. This can be circumvented by this patch:
> 
> --- html.vim.orig   2013-02-12 12:57:48.416440086 +0100
> +++ html.vim    2013-02-12 13:41:30.609442857 +0100
> @@ -63,7 +63,7 @@
>  call <SID>HtmlIndentPush('h4')
>  call <SID>HtmlIndentPush('h5')
>  call <SID>HtmlIndentPush('h6')
> -call <SID>HtmlIndentPush('i')
> +call <SID>HtmlIndentPush('i[^m]') " don't match img tag
>  call <SID>HtmlIndentPush('iframe')
>  call <SID>HtmlIndentPush('ins')
>  call <SID>HtmlIndentPush('kbd')

There are several other one-character matches.  Do they not cause a
problem?

> Second, the HtmlIndentOpen and HtmlIndentClose() function use expansive 
> regular expressions, that make vim hang on very long lines. We can tweak 
> the RE a little bit (using \%( instead of \() but this doesn't help here 
> much, so instead I would propose to generally skip lines that are, say 
> longer > 1000 chars:

Not a nice solution.

> Alternatively, we could skipt the expansive .\{-} part (I am not sure, 
> how essential this part is, it looks at a first glance superfluous and 
> causes the many expansive backtracking to happen many many times:

Yeah, this pattern is a problem.  It matches anything of any length.
It would be much faster to first find a match with a:pattern and only
then look back for what's before it.

Still have a long pending job of making the fast RE code work properly
and test it...


-- 
It is illegal to take more than three sips of beer at a time while standing.
                [real standing law in Texas, United States of America]

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui