[vim/vim] Please document the hidden g:markdown_folding option. (#7945)

76 views
Skip to first unread message

Bastian Venthur

unread,
Mar 10, 2021, 3:43:14 AM3/10/21
to vim/vim, Subscribed

Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
There is a somewhat hidden option g:mardown_folding, that is currently not documented.

Describe the solution you'd like
Please document that option.

Describe alternatives you've considered
None, really.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Maxim Kim

unread,
Mar 10, 2021, 4:02:21 AM3/10/21
to vim/vim, Subscribed

There are more

  • g:markdown_fenced_languages
  • g:markdown_minlines

Not sure what is the approach to the documentation of the ftplugin/syntax files. This one is from Tim Pope.

Bram Moolenaar

unread,
Mar 10, 2021, 9:47:21 AM3/10/21
to vim/vim, Subscribed


Cc'ing Tim Pope

> **Is your feature request about something that is currently impossible or hard to do? Please describe the problem.**
> There is a somewhat [hidden option](https://github.com/vim/vim/blob/fa79be6b10e1d34fd697a56e85f6c0ce101f3d62/runtime/ftplugin/markdown.vim#L67) `g:mardown_folding`, that is currently not documented.
>
> **Describe the solution you'd like**
> Please document that option.

This would go under ":help ftplugin-docs".

--
Looking at Perl through Lisp glasses, Perl looks atrocious.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bram Moolenaar

unread,
Mar 11, 2021, 11:29:59 AM3/11/21
to vim/vim, Subscribed

I think something like this would be sufficient:

MARKDOWN *ft-markdown-plugin*

To enable folding use this: >
let g:markdown_folding = 1

<

On Wed, Mar 10, 2021 at 9:46 AM Bram Moolenaar ***@***.***> wrote:
>
>
> Cc'ing Tim Pope
>
> > **Is your feature request about something that is currently impossible or hard to do? Please describe the problem.**
> > There is a somewhat [hidden option](https://github.com/vim/vim/blob/fa79be6b10e1d34fd697a56e85f6c0ce101f3d62/runtime/ftplugin/markdown.vim#L67) `g:mardown_folding`, that is currently not documented.
> >
> > **Describe the solution you'd like**
> > Please document that option.
>
> This would go under ":help ftplugin-docs".
>
> --
> Looking at Perl through Lisp glasses, Perl looks atrocious.
>
> /// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Maxim Kim

unread,
Mar 11, 2021, 12:09:04 PM3/11/21
to vim_dev


четверг, 11 марта 2021 г. в 19:29:59 UTC+3, Bram Moolenaar:

I think something like this would be sufficient:

MARKDOWN *ft-markdown-plugin*

To enable folding use this: >
let g:markdown_folding = 1
<


It implies that to disable it one has to do:

 let g:markdown_folding = 0

But it wouldn't disable it cause ftplugin checks for var existense:

if has("folding") && exists("g:markdown_folding")
...

Bram Moolenaar

unread,
Mar 11, 2021, 1:21:51 PM3/11/21
to vim/vim, Subscribed



Tim Pope wrote:

> I think something like this would be sufficient:
>
> MARKDOWN *ft-markdown-plugin*
>
> To enable folding use this: >
> let g:markdown_folding = 1
> <

I'll include that, thanks.

To also allow for zero to disable it, this should work:

if get(g:, 'markdown_folding', 0)

--
ARTHUR: Now stand aside worthy adversary.
BLACK KNIGHT: (Glancing at his shoulder) 'Tis but a scratch.
ARTHUR: A scratch? Your arm's off.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD


/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christian Brabandt

unread,
Mar 31, 2021, 3:08:49 AM3/31/21
to vim/vim, Subscribed

Closed #7945.

Christian Brabandt

unread,
Mar 31, 2021, 3:08:50 AM3/31/21
to vim/vim, Subscribed

fixed as of c8cdf0f

Reply all
Reply to author
Forward
0 new messages