this post was submitted on 12 Jun 2025
22 points (100.0% liked)

Linux

11185 readers
95 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 2 years ago
MODERATORS
 

The following gif demonstrates folding:

top 36 comments
sorted by: hot top controversial new old
[–] tal@lemmy.today 8 points 2 days ago* (last edited 2 days ago) (3 children)

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 1 points 14 hours 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.online 5 points 2 days ago (1 children)

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 1 points 1 day 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.

[–] bluemoon@piefed.social 1 points 2 days ago

thanks! looking into JED now

[–] maxwellfire@lemmy.world 6 points 2 days ago* (last edited 2 days ago) (1 children)

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.online 3 points 2 days ago* (last edited 2 days ago) (2 children)

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^[I absolutely adore Okular.] 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!

[–] maxwellfire@lemmy.world 4 points 2 days ago* (last edited 2 days ago) (1 children)

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.online 1 points 1 day 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!

[–] bjoern_tantau@swg-empire.de 2 points 2 days ago (1 children)

I love Kate. If I recall correctly you can even configure it to fold everything by default.

[–] HayadSont@discuss.online 1 points 1 day ago

Interesting. I will look into this. Thank you!

[–] Novocirab@feddit.org 4 points 2 days ago (2 children)

Helix apparently doesn't yet have it, but I'm sure it'll be added at some point.

[–] sxan@midwest.social 3 points 2 days ago* (last edited 2 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 (c) 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.online 2 points 2 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.

[–] bjoern_tantau@swg-empire.de 3 points 2 days ago (3 children)

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.online 2 points 1 day 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 😜.

[–] mangaskahn@lemmy.world 3 points 2 days ago (2 children)

Notepadqq is available on Linux and is a pretty good replacement

[–] Kornblumenratte@feddit.org 1 points 1 day ago

From https://github.com/notepadqq/notepadqq/blob/master/README.md:

This project is not actively maintained anymore. New maintainers are welcome.

-- Daniele

[–] HayadSont@discuss.online 1 points 1 day ago

Thank you for mentioning this! Do you happen to know what distinguishes this from Notepad Next?

[–] dual_sport_dork@lemmy.world 2 points 2 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 2 points 1 day ago (1 children)

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.online 1 points 5 hours 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?

[–] highball@lemmy.world 2 points 1 day ago (1 children)
[–] HayadSont@discuss.online 2 points 1 day ago

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

[–] who@feddit.org 2 points 2 days ago (1 children)
[–] HayadSont@discuss.online 1 points 5 hours 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 2 points 2 days ago (1 children)

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.online 1 points 1 day 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@lemmings.world 2 points 2 days ago (1 children)

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.online 1 points 1 day ago (1 children)

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^[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).] 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!

[–] rikudou@lemmings.world 2 points 1 day ago (1 children)

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.online 1 points 1 hour 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!

[–] just_another_person@lemmy.world -1 points 2 days ago (1 children)

Then it doesn't exist. Not trying to be rude, but you're asking for the moon.

[–] HayadSont@discuss.online 4 points 2 days ago (1 children)

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.

[–] just_another_person@lemmy.world 0 points 2 days ago (1 children)

There are comments, but nobody is recommending what you're asking for which is a CLI editor, if I'm not mistaken.

[–] HayadSont@discuss.online 6 points 2 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!