On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Quoting Mikolaj Machowski <[EMAIL PROTECTED]>:

> On pitek 06 kwiecieD 2007, vim@vim.org wrote:
> > After looking at foldutil.vim and AutoFold.vim I'm not sure what the
> > best way is going to be for exploiting the outline format of helpfiles
> > to automatically create folds.
> >
> > Has anyone done this before?  Ideally, I'd like to use this with the
> > foldlist.vim plugin to have something like a left-side nav-bar while
> > reading helpfiles.
>
> AFAIR Chip Campbell on his page had special version of help.vim with
> folding, extended highlighting etc.

I have an additional-help syntax file at my website (and it does support
syntax-based folding):

  http://mysite.verizon.net/astronaut/vim/index.html#HELP

I updated the one on my website, too.  Caveat: I used to have a version on
vim.sf.net, but it was receiving -1s, so I withdrew it.  Nonetheless, I use it
all the time (the withdrawn one didn't support syntax folding, because vim
itself didn't support folding back then).  Its in vimball format; you'll need a
new vimball plugin to extract it.  Directions for that are also on my website.
The new vimball plugin has been fairly stable recently, so hopefully when the
new vim comes out whenever this will be considerably simpler.
Thanks a lot!

Folding works on the GetLatestVimScripts helpfile but I'm not getting folds
for the non-local addition helpfiles, e.g. usr_41.txt.  If I change the start
pattern for the 'fold' line in the help.vim syntax file to the following I get
what I expect:

start="^\*\?\d\+\.\(\d\+\)\*\?\(\s\|\a\)"

I'm new to fold definitions in syntax files, how could I define subfolds for
sections that you see in helpfiles like usr_41.txt?  I feel confident
constructing the start/end pattens for those regions that are delimited by
all-caps headings.  After reading syn-fold I think all I have to do is add:

syn match helpSubsection ... start=<all-caps heading> ...

At any rate, I'll keep playing around; this did just what I was looking for.


--
Ian Tegebo

Reply via email to