The following gif demonstrates folding:

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    3 days ago

    If you only care about folding Markdown, as in your animation, I’m sure that there are Markdown-specific editors that do that.

    If you want folding across a wide variety of languages, then I think that your choices are going to be more-limited, since those editors need to be able to parse those languages. Vim and Emacs are kinda the Big Two general-purpose editors, and they’re gonna have the widest support.

    EDIT: For specifically programming languages, a number of IDEs can probably do it.

    Here’s Eclipse, for example.

    EDIT2:

    https://en.wikipedia.org/wiki/Comparison_of_text_editors

    This has a “text folding” and “code folding” column.

    • ruud@piefed.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      This is a very cool list, I will try some. The feature I am looking for is not included in the overview so I’ll have to just try. Unless someone can suggest which app has this feature: I want to be able to click/double click a quote to select the text between the quotes. This to easily replace text between quotes. On MacOS I used to use BBEdit which has this feature. But now I’m on linux so looking for a replacement. (I do know the ci' vi-command but am looking for a GUI editor). I use Fedora KDE Plasma

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 days ago

      Apologies for not being clear, and thank you for probing me to answer the right questions:

      • I’m not married to Markdown or any other markup language, but it is true that Markdown makes up my primary use case.
      • Though, with emacs installed, I’ve also dabbled into org-mode. And while I’ve been liking it so far, I understand that it’s mostly an emacs thing.
      • I suppose my current needs would mostly be fulfilled with Markdown + LaTeX.

      Here’s Eclipse, for example.

      Thank you for mentioning Eclipse! Will look into it!

      https://en.wikipedia.org/wiki/Comparison_of_text_editors

      This has a “text folding” and “code folding” column.

      Wow, that’s pretty neat! Very much appreciated!

      • ShadyGrove@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        You can pretty easily export Org mode files to markdown (and LaTeX)! There may be a setting you need to turn on (I forget and I’m not at my PC), but it works well and is very easy to use.

        Also, I haven’t really done it, but from what I understand you can also setup emacs to be a really good LaTeX editor.

        • HayadSont@discuss.onlineOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          12 hours ago

          You can pretty easily export Org mode files to markdown (and LaTeX)!

          Oh wow, thank you for offering me this learning experience!

          There may be a setting you need to turn on (I forget and I’m not at my PC), but it works well and is very easy to use.

          I’m on Doom Emacs, so perhaps this is enabled by default. But, at least for me, it was as easy as pressing SPC m e. This opens up the export menu. From there; one may select LaTeX, Markdown or any of the many other options to export to. The fuzzy search from M-x also allowed me to find it by typing out the functionality I was seeking.

          Granted, I am not entirely content on how Emacs handled the export to Markdown. But I wouldn’t bat an eye if Emacs enables me to configure it exactly as I’d want to.

          Also, I haven’t really done it, but from what I understand you can also setup emacs to be a really good LaTeX editor.

          Again, I wouldn’t be surprised. It seems Emacs lends itself extremely well to whatever you throw at it 😂. No doubt; this is dndgame-material for sure*.

  • Max@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    3 days ago

    I believe Kate does that! It’s a GUI and not a TUI though. Not sure if that was a requirement as well

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      3 days ago

      Thank you for mentioning Kate! The GNOME-fanboy inside of me would probs like to resist it, but sometimes KDE’s offering is strictly better[1] at least IMO*. I’ll look into it and see if it satisfies my needs.

      It’s a GUI and not a TUI though. Not sure if that was a requirement as well

      That wasn’t a requirement. Regardless, thank you for the heads up!


      1. I absolutely adore Okular. ↩︎

      • Max@lemmy.world
        link
        fedilink
        English
        arrow-up
        5
        ·
        edit-2
        3 days ago

        I like it a lot when I don’t need a full IDE or a terminal editor (which I use micro for).

        The folding in Kate isn’t bound to a keyboard shortcut by default, but you can bind the katepart > Toggle current node in settings > configure keyboard shortcuts. It’s also available via mouse on the left side.

        • HayadSont@discuss.onlineOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 days ago

          The folding in Kate isn’t bound to a keyboard shortcut by default, but you can bind the katepart > Toggle current node in settings > configure keyboard shortcuts. It’s also available via mouse on the left side.

          Thanks for the heads-up!

    • 𝕽𝖚𝖆𝖎𝖉𝖍𝖗𝖎𝖌𝖍@midwest.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      3 days ago

      If they ever roll out plugins, or whatever. There’s a lot of functionality piled up behind that.

      Edit: I was wrong. It’s going to be in core. It’s just been “in progress” for two years because (a) there have been prerequisite blockers slowly getting implemented, (b) it’s hard, in part because of other Helix features like multiple cursors, and © the guy implementing it (and who can implement it is, in his words, limited to a couple of people with deep Helix knowledge) hasn’t had time.

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      Hopefully it will receive it soon*; my Helix-installation has been collecting dust ever since the folding-workflow has been growing on me.

  • Björn Tantau@swg-empire.de
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 days ago

    Scite can do it.

    Notepad++ probably too but I don’t know if it’s available on Linux. I just remember it being the text editor to use on Windows.

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      Scite can do it.

      Noted. Thank you!

      Notepad++ probably too but I don’t know if it’s available on Linux.

      FWIW, someone else pointed out the existence of Notepad Next. Which IIUC is pretty much an open-source and cross-platform reimplementation.

      I just remember it being the text editor to use on Windows.

      Frankly, I never used it when I was using Windows 😅. I suppose I was (somehow) conditioned at the time to use whatever M$ Office offered instead 😜.

    • dual_sport_dork 🐧🗡️@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 days ago

      It can indeed, but Notepad++ is explicitly Windows only.

      There are some clones for Unixlike platforms, and I guess you could run the genuine article in Wine if you really felt like it. But don’t go looking for an official Linux build, because there isn’t one.

  • hedgehog@ttrpg.network
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 days ago

    SublimeText seems to have it. I don’t personally use it but it’s a pretty competent editor and it’s not in the feature table from the Wikipedia page someone else shared.

    Sublime 3 was limited to folding by indentation; I’m not sure if that’s true for Sublime 4 as well, but the Markdown plugin docs have a note on folding and mention you can fold by section and heading levels.

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      Thank you for mentioning Sublime Text! It seems to be a very competent text editor. However, unfortunately, I don’t like how it is not open source.

      I think my needs for a text editor for making notes and/or writing texts are mostly fulfilled between Emacs and Kate. At least…, for my untrained eyes. Do you think Sublime Text offers merit beyond (either of) these to be considered instead?

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      2 days ago

      Thank you so much! The instructions will be very helpful whenever I test out Zed later today or early tomorrow.

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      Sorry for the late response.

      I’ve tested most of what has been suggested and I can attest that Kate is indeed very good. Thanks for mentioning your endorsement as well!

      However, while I really like Geany aesthetically, I wasn’t able to fold Markdown headings with it. Uhmm…, would you happen to know if this is actually featured?

  • communism@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 days ago

    I’m not sure about markdown but plenty of IDEs can fold eg a method or a class. Off the top of my head I know Geany, Jetbrains, probably most gui text editors/IDEs do. Not sure about markdown specifically, I only use vim for markdown which I know can fold.

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      Yeah it seems folding with markdown isn’t as ubiquitous as I’d like. I’ve tested a couple text editors since yesterday and only Kate (and (by extension) KDevelop) did a decent job at supporting folding with markdown.

  • Rikudou_Sage@lemmings.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 days ago

    JetBrains IDEs, though that might be a little heavy for some light editing. Not sure if their Fleet editor is electron based, but my guess is it’s not. That one should be more lightweight.

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      3 days ago

      JetBrains IDEs

      I have used them in the past. They’re definitely pretty cool and do their job well. Unfortunately, unless I’m wrong, most of their offerings[1] are not open source. I believe this also applies to Fleet.

      My apologies for not making it clear in the post, but I do prefer open source whenever I can afford it.

      Finally, there’s a lot not to like about electron, but I feel like JetBrains’ use of JVMs isn’t a lot better.

      Regardless, I will note it down as I intend to test them all out anyways :P .

      Please feel free to correct me if I’m wrong in any of the above. Thank you!


      1. Don’t quote me on this, but I believe their open source options are limited to the community editions of IntelliJ IDEA and PyCharm. Which isn’t too bad as both of them should support a plethora of languages (including Markdown). ↩︎

      • Rikudou_Sage@lemmings.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        2 days ago

        Well, bundling a full browser and using a mature and popular runtime are very different things in my book.

        But yeah, if you want an open source tool, JetBrains is not the tool to use.

        • HayadSont@discuss.onlineOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          20 hours ago

          Well, bundling a full browser and using a mature and popular runtime are very different things in my book.

          Thank you for clarifying that distinction for me!

          But yeah, if you want an open source tool, JetBrains is not the tool to use.

          Thank you for confirming it for me! Regardless, your recommendation has been much appreciated!

    • HayadSont@discuss.onlineOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 days ago

      Sorry, I don’t understand. It seems others have already recommended text editors that probably fit the bill.

      Perhaps my post was unclear or causing confusion? If so, please allow me to correct myself.

        • HayadSont@discuss.onlineOP
          link
          fedilink
          English
          arrow-up
          6
          ·
          3 days ago

          Ah okay, my apologies for not being clear enough!

          While emacs and (neo)vim definitely fit the bill of CLI/TUI editors, I am open to GUI editors.

          Thank you for allowing me to clarify myself!