On Wed, Dec 15, 2010 at 09:18:07PM EST, Xin Wang wrote:
> On Dec 6, 5:55 pm, Chris Jones <[email protected]> wrote:
> > I was wondering if anyone had implemented a barebones form of syntax
> > folding in Vim. By ‘barebones’, I mean something that automatically
> > creates folds for sections & subsections and possibly lists & blocks.
> >
> 
> Here is a method that is not automatical, but the effort is trivial.
> 
> I use marker fold method to fold asciidoc.Firstly put following line
> to
> ~/.vim/ftplugin/asciidoc.vim, this set vim to show content of line
> below
> marker when something is folded.
> 
>      setl foldtext=getline(v:foldstart+1)
> 
> Then in asciidoc text, put a comment line to set foldmethod, like
> this:
> 
>      // vim: fdm=marker
> 
> And when you want to fold some section, just put `// {{{1` `//
> {{{2` ...
> above title line.

I'll give it a shot, but it does look like a lot of work when you are
looking at several hundred pages of documentation.

Thanks,

cj

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to