On 6/1/07, Charles E Campbell Jr <[EMAIL PROTECTED]> wrote:
Howard Glynn wrote:

> <snip>
>
> I wondered whether there was a plugin somewhere that was able to
> abbreviate or
> partially hide the detail so i can see the overall structure more
> clearly. In essence I
> would like to collapse huge (single) lines of tags to something like
> <a id="xyz"
> href="/img ....... - where "...." implies I could expand if required.
> I'm sure it is probably
> possible to craft a plugin to do this, i just have some urgent
> deadlines right now ;)
> <snip>


Hello!

Sounds like Vince Negri's conceal patch to vim would come in handy for this.
Vim's current folding is on a line-by-line basis; Negri's patch can also
perform
concealing in lines.

You can get his patch at:  http://vince.negri.googlepages.com/

Here's an example, although it may conceal more than what you've
requested...

if has("conceal")
 if &conc == 0
  let &conc= 3
 endif
 syn clear
 syn region htmlTag conceal start="<" end=">"
endif

So this will conceal anything between <...> .  One neat thing; even
though I've
selected conceal level 3, nonetheless, when your cursor is atop a line
that line
will *not* be concealed.  So editing may proceed, as that's what Vim's for.

A more comprehensive (but not html-related) example of concealing is
available
at my website: see AnsiEsc.vim.  This plugin will conceal ansi escape
codes and
perform proper colorizing of the text based on the concealed ansi codes.

Vince N has a tex.vim syntax using concealment, too, somewhere...

BTW, folks -- if more people than H Glynn would want this -- let Bram
know!  He's under
the impression that its not wanted very much, which is why I presume its
not in vim 7.x.

Vince's patch also supports "ownsyntax".  Read about it at his website.

Regards,
Chip Campbell



I would use conceal if it were in standard vim.  Definitely.

--
-fREW

Reply via email to