GithubHelp home page GithubHelp logo

Comments (8)

deathaxe avatar deathaxe commented on June 12, 2024

In the folded condition, there is no empty line in-between ### sections

Maybe a question of taste, but this is the style MarkdownEditing has always used to fold headings/sections. Should be easy to tweak, but I don't want to add settings for that and most (all other) users seem to be fine with current state.

Folding eats up the -------- dividing line, ...

Both syntax based folding rules and plugin based folding feature are designed to fold regions between headings. So this is working as expected.

There are no little arrows or smth. like this, to fold/unfold with a mouseclick.

MarkdownEditing ships basic syntax based folding rules, which should enable ST to draw fold buttons next to headings.

grafik

Note

Fold buttons are displayed only, if ST detects foldable regions via indentation levels or via folding rules. The latter one and thus fold buttons next to headings are enabled only if "fold_style" is set to "auto" or "scope_only".

Beyond that MarkdownEditing has shipped plugin based folding features for ages. Started with long before syntax based folding was added to ST's set of core features. As there's no API to announce foldable reagions or to interact with fold buttons, key bindings are all plugins can use. ST doesn't display fold buttons until a folded region is detected, if it hasn't found foldable regions on its own.

MarkdownEditing overrides default fold/unfold key bindings to provide an as consistent as possible UX compared to ST's default behavior.

Current state of ST's syntax based folding engine is insufficient to replace plugin code, completely.

Note

Syntax based folding (via buttons) and plugin based folding (via key bindings) may behave a little bit different for historic reasons and because of different philosophy with regards how sections between headings are intendet to be folded. Syntax based folding is to naive to support all features, plugin can do.

from markdownediting.

glow12121 avatar glow12121 commented on June 12, 2024

Maybe a question of taste, but this is the style MarkdownEditing has always used to fold headings/sections. Should be easy to tweak, but I don't want to add settings for that and most (all other) users seem to be fine with current state.

Thanks for the reply.

Folding is literally the main thing I need from the plugin and this style of folding seems very counter-intuitive. In markdown, empty lines are what creates separate paragraphs. Are there ways for me to tweak this?

Also, how can this little triangle on the left be enabled?

image

from markdownediting.

deathaxe avatar deathaxe commented on June 12, 2024

Folding doesn't work "per paragraph" and there's no way to tweak it.

from markdownediting.

glow12121 avatar glow12121 commented on June 12, 2024

I didn't ask about folding per paragraph -- but about keeping empty lines in-between folded sections.

The questions about the little mysterious triangles remains, too.

from markdownediting.

deathaxe avatar deathaxe commented on June 12, 2024

To enable fold buttons, set "fold_style" to "auto" or "scope_only" in Preferences - assuming ST 4145+.

Otherwise, I can't say something about it. Basic syntax specific folding rules are provided, so folding buttons should appear in ST 4143+. If not, maybe a core issue. Works fine on Win11 with MarkdownEditing being the only package installed in ST running in SAFE MODE.

from markdownediting.

glow12121 avatar glow12121 commented on June 12, 2024

A. Oh well, in ST 4143 on Linux, these little triangles are seemingly not there.

B. If it is somehow possible to keep a distance in-between the folded headlines, please let me know.

image

from markdownediting.

glow12121 avatar glow12121 commented on June 12, 2024

In the case of the little arrows on the left margin, I have figured out what was the problem. I had "gutter": false, which, naturally, made it impossible for the little arrows to be displayed.

image

Also, for some reason there's now an empty line in-between headlines. Have no idea why but, to me, it looks nice.

Anyway, thanks to the devs for trying to guide me through this and for maintaining the plugin.

from markdownediting.

glow12121 avatar glow12121 commented on June 12, 2024

Why I think there should be an empty line in-between folded headlines by default -- because in Markdown an empty line is what creates a paragraph. No empty line is counter-intuitive. It looks out of tune too.

from markdownediting.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.