Skip to content

Allow for Markdown-style (and/or other style) of Headers  #42

Description

@jeetsukumaran

Currently, when using anyfold to fold away lists in a plain text files, any section headings in the file get confused as part of the list.

For e.g., given

# Heading 1

## Heading 1.1

-   List level 1
    -   List level 2
        -   List level 3
        -   List level 3
    -   List level 2
        -   List level 3
        -   List level 3

## Heading 1.2

-   List level 1
    -   List level 2
        -   List level 3
        -   List level 3
    -   List level 2
        -   List level 3
        -   List level 3

## Heading 2

## Heading 2.2

-   List level 1
    -   List level 2
        -   List level 3
        -   List level 3
    -   List level 2
        -   List level 3
        -   List level 3

## Heading 2.2

-   List level 1
    -   List level 2
        -   List level 3
        -   List level 3
    -   List level 2
        -   List level 3
        -   List level 3

we see:

Screenshot from 2021-09-25 22-34-40

Would it be possible to have vim-anyfold optionally recognize these headings and not fold them, so it looks like this:

Screenshot from 2021-09-25 22-37-19

This can be a command, e.g., "AnyFoldIncludeTextHeaders on" (which will fold headers, as it does now, by default), "AnyFoldIncludeTextHeaders off" (which will result in the second case).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions