On Jan 12, 9:39 am, jimrandomh <[email protected]> wrote:
> I'm currently working on a folding-related plugin. Its main function
> is to generate good folds from syntax, spanning a function, its header
> comment, and one blank line after, so that a folded-up file ends up
> looking like a table of contents; each function takes exactly one
> line, and the only stuff that ends up unfolded is header comments and
> blank lines that serve to group them into sections. It also generates
> good summary lines; when you fold up a function, it replaces it with
> its prototype, and also extracts comments like //TODO and //FIXME in
> the body and adds them to the summary.
>
> I would like to use color in the summary line, but I've run into
> trouble there. I want to make todo's and fixme's bold, like in the
> unfolded version, highlight keywords and tags, and dim some other
> information like length that would otherwise be intrusive.
> Unfortunately, the syntax-highlighting system just colors the whole
> line with the 'Folded' color. Using "syntax match regex
> containedin=Folded" doesn't seem to do anything useful, and the
> foldtext option (which I use to call the function that generates the
> summary line) only lets me return a string. So I don't seem to be able
> to do this. What I'd ideally like to do, is put some special sequences
> in foldtext's return value.
>
> Any ideas for how to get multicolor foldtext? And if it's currently
> impossible, as I suspect, any chance of adding it in a future version?

This is not currently possible. I vaguely remember seeing a patch
which added the ability to have different colored fold text, but I
think that may have been just based on fold level or something, not
actually different colors within a fold. I cannot seem to find the
list of unofficial patches which used to be on this list's home page
to verify...

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

Raspunde prin e-mail lui