habamax / vim-asciidoctor

Asciidoctor plugin for Vim
MIT License
182 stars 16 forks source link

CrIs there documentation for folding? #75

Closed whnr closed 4 years ago

whnr commented 4 years ago

At the moment there are only a few lines in the readme. A bit more documentation would be great. What do the settings do

" Fold sections, default `0`.
let g:asciidoctor_folding = 1

" Fold options, default `0`.
let g:asciidoctor_fold_options = 1

I assume ...folding = 1 is just enabling the folding. but what are the fold_options. Is there a switch for nested vs flat folding? It looks like this right now for me. Third level is folded under second level: grafik

habamax commented 4 years ago

yes, folding is to enable folding, fold options is to fold :options:

= Title
Maxim Kim
v0.1, 2020-09-08 : Draft
:pdf-style: default
:doctype: article
:title-page:
:toc: left
:toclevels: 3
:sectnums:
:sectnumlevels: 4
:source-highlighter: rouge
:rouge-style: github
:!source-linenums-option:
:imagesdir: images
:chapter-label:
:icons: font
:autofit-option:
:experimental:
:compress:

image

habamax commented 4 years ago

there is no switch between "flat" and "nested": folding is nested with the exception of = Title. It is considered as the first level of headings (== Heading 1), otherwise your whole document would be folded into a single fold.