In search of a non-electron text editor that can fold | Are emacs and (neo)vim my only options?
from HayadSont@discuss.online to linux@lemmy.ml on 12 Jun 18:13
https://discuss.online/post/21746414

The following gif demonstrates folding:

#linux

threaded - newest

0x01@lemmy.ml on 12 Jun 18:16 next collapse

SublimeText?

HayadSont@discuss.online on 12 Jun 18:22 collapse

Looks cool. Thanks!

Uhmm…, did I understand correctly that it’s not open source?

mnmalst@lemmy.zip on 12 Jun 18:34 collapse

Not op but no it’s not.

HayadSont@discuss.online on 12 Jun 18:41 collapse

Thank you for the clarification!

While I didn’t mention it explicitly in the post, I do intend to stick to open source.

winety@lemmy.zip on 12 Jun 20:34 collapse

Sublime Text is not open-source but it has a sane price and a WinRAR-style trial. I use it because it feels a lot snappier than other editors/IDEs I’ve tried when browsing large files.

On the one hand, it’s a shame that it’s not open-source, but on the other hand, developers have to make a living from something.

mesitoispro@ttrpg.network on 13 Jun 00:38 next collapse

developers have to make a living from something.

How do other developers do it?

winety@lemmy.zip on 13 Jun 17:17 collapse

If I said I knew exactly what I was talking about, I’d be lying. But it’s generally accepted that funding of open-source is not in an ideal state.

HayadSont@discuss.online on 13 Jun 05:23 next collapse

I use it because it feels a lot snappier than other editors/IDEs I’ve tried when browsing large files.

Snappiness is definitely something I appreciate. So, if it blows everything else out of the water in this respect, that I might have to concede. Thank you for mentioning this particular aspect of it!

On the one hand, it’s a shame that it’s not open-source, but on the other hand, developers have to make a living from something.

I wholeheartedly agree. But, I prefer the capability to donate to the open-source software developers that I love to support.

utopiah@lemmy.ml on 14 Jun 04:45 next collapse

I wholeheartedly agree. But, I prefer the capability to donate to the open-source software developers that I love to support.

Right indeed, not sure why it was implied that open source software couldn’t be a financially viable option for developers too.

HayadSont@discuss.online on 14 Jun 22:05 collapse

Couldn’t agree more.

Btw, I would like to take this chance to thank you and @winety@lemmy.zip for the civil, respectful, engaging and informative conversation you were having elsewhere!

utopiah@lemmy.ml on 15 Jun 05:26 collapse

Ah! Isn’t it wonderful when we discuss to learn rather than be right? :D

expr@programming.dev on 14 Jun 12:55 collapse

It’s definitely not faster than vim, fwiw.

HayadSont@discuss.online on 14 Jun 22:00 collapse

Thank you for this crucial piece of information! Much appreciated!

As such, Sublime Text has (kinda) lost all of its relevancy for me.

utopiah@lemmy.ml on 14 Jun 04:44 collapse

On the one hand, it’s a shame that it’s not open-source, but on the other hand, developers have to make a living from something.

I’m pretty sure most people here, at least I hope, who use open source and free software directly money donate to developers. I know of plenty of developers who do get paid writing open source through such donations or via funding, e.g. NLNet or grants. Maybe I’m misunderstanding your statement, are you saying Sublime Text isn’t open source because they believe those ways are not appropriate for them?

winety@lemmy.zip on 14 Jun 09:24 collapse

I wrote a whole comment in which I mused about the reason why Sublime Text isn’t open-source. However, a brief search found one developer’s answer: They just don’t think that typical FOSS funding is sustainable for their particular project.

utopiah@lemmy.ml on 14 Jun 16:07 collapse

FWIW I’m donating every month to CodeMirror author, donates to Vim, etc. I’m not saying they are wrong, nor right, solely that implying (but maybe I misunderstood the comment) that somehow open-source and getting paid are antagonist is IMHO damaging to FLOSS broadly.

winety@lemmy.zip on 14 Jun 19:35 collapse

That’s a fair point. Still, I think it’s also worth acknowledging that getting paid to develop open-source software can often be more difficult than getting paid for proprietary work. According to Tidelift State of Open Source Maintainer report, 44 % of FOSS maintainers aren’t getting paid for their work but would like to. Interestingly, 36 % of FOSS maintainers are getting some monetary compensation.¹

(I’m responding mostly because I found that survey. Interesting numbers.)

¹ I thought this number would be smaller. Alas, I am a pessimist.

utopiah@lemmy.ml on 15 Jun 05:26 collapse

44 %

Very interesting, thanks for sharing. That number is of course way too high. I won’t point fingers but… OK I will, I would argue, naively, that a lot of that frustration comes from corporate exploitation. I bet a lot of that comes from maintainer who noticed big number of downloads on CDN but no PR because somehow a paid for tool (so not blaming just BigTech here) relies on their work… and they don’t see a cent for it.

I doubt most people who have a quirky side project, say something about how to use Lego controllers for their model train on the weekends with kids, really mind. Sure they’d love to see a bit of money from it but whatever.

Anyway I’ll dig into that report a bit more, thanks for sharing!

HaraldvonBlauzahn@feddit.org on 12 Jun 18:21 next collapse

You might have a look at LEO:

en.wikipedia.org/wiki/Leo_(text_editor)

I used it extensively for some time to write big documentation. It is good.

But I’d guess that for most tasks, Emacs org-mode is the most powerful option.

HayadSont@discuss.online on 12 Jun 18:32 collapse

Interesting. First time reading about it*. Were it not for you, this might have been completely off the radar. So thank you for mentioning it!

But I’d guess that for most tasks, Emacs org-mode is the most powerful option.

Yeah, it has been slowly growing on me 😜. But I would like to explore all other options before I fully commit.

mina86@lemmy.wtf on 12 Jun 21:29 next collapse

Yeah, it has been slowly growing on me 😜. But I would like to explore all other options before I fully commit.

You’ve already discovered the best editor. There’s no need to explore more. ;)

HayadSont@discuss.online on 13 Jun 06:36 collapse

You’ve already discovered the best editor. There’s no need to explore more. ;)

Hehe 😜. Perhaps the purpose of this exploration is to cement the idea that I’m already on the best 😂. We’ll see 😉.

HaraldvonBlauzahn@feddit.org on 14 Jun 12:13 collapse

What makes LEO great for consistent larger documentation is that one can write things like footnotes or a glossary in nodes which can be linked into multiple pages - much like files with multiple hard links in a file system.

Also, it can re-read exported generated files into a structured outline, which is managed under version control.

Also, good support for literate programming, which is Don Knuth’s perhaps greatest idea.

HayadSont@discuss.online on 15 Jun 06:25 collapse

LEO definitely looks like a cool project. It has made me curious and I would like to try it out. Thanks (again)!

However, before I do, I would like to verify if folding^[Also known as collapse/expand] a section/heading in Markdown -as demonstrated in the gif- is possible with LEO. Could you please confirm this for me?

Also, good support for literate programming, which is Don Knuth’s perhaps greatest idea.

Very interesting concept. I believe I stumbled upon this video about a week ago. Together with two other videos, It has been at the very top of “Watch Later”-list since. But I haven’t gotten around to watch it yet 😅. I believe the topics are related. Am I right? Regardless, I’ll definitely take a deeper look into literate programming. Thank you for mentioning it!

anon5621@lemmy.ml on 12 Jun 18:39 next collapse

Kate,kdevelop,xed,mousepad,gnome builder.,notepad next(clone notepad++)

HayadSont@discuss.online on 12 Jun 18:45 collapse

That’s a lot of options! Thank you.

slacktoid@lemmy.ml on 12 Jun 19:28 next collapse

There’s also Zed. And helix.

Amongst all the other great alts here

Also neovim is really dope! Just have to throw that there

HayadSont@discuss.online on 12 Jun 19:38 collapse

There’s also Zed.

Noted. Thank you!

And helix.

I believe this doesn’t have folding (yet). Unfortunately.

Also neovim is really dope! Just have to throw that there

xD , Neovim is definitely pretty cool.

RageLtd@lemmy.world on 13 Jun 02:36 collapse

I use Zed as my primary editor these days. It’s just about ready for prime time!

(Source: 12 years of web and Linux hacking)

HayadSont@discuss.online on 14 Jun 17:43 collapse

By admission of my fellow Lemmy-users, I’ve gone and tried out many text editors over the course of the past few days. Unfortunately, I didn’t like the installation options for Zed in my current distro of choice (i.e. Fedora):

  • its flatpak is unverified
  • not found in Fedora’s own repos

It is found within Terra’s repos. However, users report that -at least for Zed- some of the installed packages from Fedora’s own repo are replaced by Terra’s. This interaction can be prevented by giving preference for Fedora’s own packages, but it seems like a can of worms I’m not very interested to engage with at the moment. Hopefully this situation will be resolved rather sooner than later.

Anyhow, have you got the chance to work with Emacs and/or Kate over the years? If so, could you chime in and give your thoughts on how Zed fares in comparison? Please note that I’m (mostly) asking within the confines of a relatively simple text editor used to take notes with.

RageLtd@lemmy.world on 14 Jun 22:33 collapse

Honestly I never really got into using any of the terminal based editors- I like a pretty GUI, personally.

That being said I have been a KDE user for the last couple of years and actually have quite a favourable view on Kate. It’s a very competent editor with a great deal of extensibility.

The big difference between the two is their focus. Zed is written to be targeted at developers and as such has some capabilities that Kate doesn’t (afaik) like an AI assistant panel, handling multi megabyte text files with grace, and being able to directly connect to remote file systems over SSH.

If you’re not looking for those features I think you’d be very happy with Kate!

Mwa@thelemmy.club on 12 Jun 19:53 next collapse

Geany(Its a lightweight GTK Based IDE)

HayadSont@discuss.online on 12 Jun 19:58 next collapse

Thank you!

Question: According to this table, Geany’s capabilities might leave some to desire when it comes to code/text folding. Is this correct? Or is the table simply outdated?

Mwa@thelemmy.club on 13 Jun 06:50 collapse

Yw and I think it’s up to date that list (i just looked at article last updated)

HayadSont@discuss.online on 14 Jun 18:12 collapse

Thank you for confirming my suspicions. I took it for a test run and wasn’t able to replicate the above functionality either. Hopefully it’s an error on my side, but it’s very possible that I will not stick to Geany.

Mwa@thelemmy.club on 15 Jun 11:34 collapse

Did you try plugins but sure it’s fine

xavier666@lemm.ee on 13 Jun 10:43 collapse

Too low on the list

IceVAN@beehaw.org on 12 Jun 20:25 next collapse

Textadept!.

HayadSont@discuss.online on 12 Jun 20:32 collapse

Yet another one I’ve never heard of before. Thank you so much for mentioning it!

some_guy@lemmy.sdf.org on 12 Jun 20:31 next collapse

Sublime.

HayadSont@discuss.online on 12 Jun 20:33 collapse

Thank you! Unfortunately, I’ve come to the understanding it’s not open source. So it’s unlikely I’ll go for it.

flubba86@lemmy.world on 12 Jun 21:46 next collapse

On windows: Notepad++. On Linux-based OS: Kate. And there’s also JetBrains Fleet, that is jetbrains answer to vscode.

mvirts@lemmy.world on 13 Jun 03:25 next collapse

Also notepad++ on wine on Linux … Not my favorite but it’s there

flubba86@lemmy.world on 13 Jun 03:34 collapse

Yeah… but why? Kate is better in about every way. And while we’re on the topic, Kate is also available on the windows store, with a real Windows build.

mvirts@lemmy.world on 13 Jun 04:27 collapse

Ya I agree with this

HayadSont@discuss.online on 13 Jun 15:42 next collapse

Thank you!

I tested Notepad Next, which seems to be Notepad++’ cross-platform alternative. However, I wasn’t able to get the folding functionality on a Markdown file. Am I doing something wrong?

I’ve tried Kate since yesterday, it has been one of the better ones for now.

JetBrains Fleet seems like a cool project. But I’ll probably wait until it’s open sourced. Thanks anyways!

ILikeBoobies@lemmy.ca on 14 Jun 15:57 collapse

Kate is for Windows and Mac as well

mesitoispro@ttrpg.network on 13 Jun 00:37 next collapse

I love Kate. It’s very customizable without being overwhelming.

HayadSont@discuss.online on 13 Jun 15:51 collapse

I have to agree with the positivism surrounding Kate. It has been the only one (together with KDevelop) out of the 5 text editors I’ve installed and tested since yesterday that actually did what I desired from it. Props to the devs! Let’s see if it can dethrone Emacs 😜.

callcc@lemmy.world on 13 Jun 22:49 collapse

Emacs will always be abe to do things you can’t do with other editors. It’s a text based interface toolkit that happens to also have a good text editor and IDE capability. Buuut, you need to spend a lot of time to set things up. I use it since probably more than 20 years and I still often need to look up and learn stuff. If you want a tool and not a workshop, get a simpler editor.

HayadSont@discuss.online on 15 Jun 08:00 collapse

I think you’ve done an excellent job at capturing my initial thoughts. It basically felt as if using Emacs was bound to be overkill as my (relatively simple) use case didn’t seem to warrant its usage.

But, even if it is (possibly) overkill, I do prefer^[Granted, I haven’t tried out Neovim for this yet.] how Emacs handles the folding. So, while there’s the very real possibility that I’ll not even utilize 1% of Emacs’ potential, I feel most excited and (somehow) comfort while working with it 😅.

As for setting things up, I immediately started using Emacs through Spacemacs until the input lag became very noticeable on larger files. Then, I pivoted to Doom Emacs and I’ve been enjoying it so far. Perhaps I’ll create my own config at some point in the future, But for now, Doom Emacs is all I need.

t0mri@lemmy.ml on 13 Jun 04:21 next collapse

I remember something called lapce too

Edit 0: github.com/lapce/lapce

HayadSont@discuss.online on 14 Jun 17:58 collapse

Thank you for mentioning Lapce!

I have been interested in Lapce for a long time. Unfortunately, IIUC, it doesn’t support folding Markdown headings as shown in the gif. At least, I wasn’t able to get it to work. Can you attest to this? Or am I doing something wrong? Your aid would be much appreciated!

DieserTypMatthias@lemmy.ml on 13 Jun 09:46 next collapse

Will probably get airstriked for this, but Zed is also a option.

Also, if you’re using GNOME, then try GNOME builder. And if you’re using KDE, then try KDevelop or Kate.

TerHu@lemmy.dbzer0.com on 13 Jun 10:28 next collapse

i’ve heard that some people love using kate because, with some plugins, it really can do all most people need. i’ve seen a dude make a video on it but would need some time to find it again if there was any interest.

pbg@sh.itjust.works on 13 Jun 11:32 next collapse

tbf, i love zed and using it for big stuff and neovim for basic scripts is the perfect balance for me

HayadSont@discuss.online on 14 Jun 18:25 collapse

Thank you for your recommendations!

Hopefully I’ll get around to take Zed for a test drive in the near future.

As for GNOME Builder, for some reason, I wasn’t able to replicate what’s seen above with it. Perhaps it doesn’t support Markdown that well. Or…, it needs/requires a plugin to do its bidding. Would you happen to know more on this? Any help is appreciated!

KDevelop and Kate, on the other hand, have been a very pleasant surprise. I have literally checked about a dozen of text editors since yesterday, and these two have been the only ones that have yielded the desired result. Props and kudos to the dev team!

Nibodhika@lemmy.world on 13 Jun 11:34 next collapse

Others have given you many options, but I would like to know why Nvim or Emacs are not good options for you?

HayadSont@discuss.online on 14 Jun 21:19 collapse

No no, don’t get me wrong. I think both Emacs and Neovim are excellent. And this little endeavor/search/pursuit has (perhaps more than anything) solidified (and gave context as to) why they’re in their own league.

Like, I’ve tried about a dozen of text editors in last couple of days. And with most^[Heck, I’ve only been able to confirm that Kate and KDevelop at least do what has been advertised (by others).] of them I’ve failed to reproduce the functionality demonstrated in the gif.

But even the very best of what I’ve tried since making this post pales -or at least seems to be*- in terms of extensibility. And, when we add in Emacs’ proven^[Neovim is still relatively new. I don’t think I can justifiably vouch for its longevity yet.] longevity, it becomes hard to root for any of the alternatives. At least…, so far*.

Still, I had to answer for myself if committing to Emacs (or Neovim for that matter) was justified given the fact that I had not a lot of experience with text editors 😅. Like, as funny as it sounds, I’ve moved from Word+StickyNotes to (GNOME’s) Text Editor to a bunch^[I can recall ghostwriter, MarkText and QOwnNotes.] of Markdown text editors to Emacs. And the switch to Emacs was mostly motivated when I saw Obsidian do the very thing you see in the gif 😂. But as cool as learning the ropes of Emacs was, I think I was experiencing some impostor syndrome shenanigans.

Thankfully, it seems that this has mostly served to be a huge motivation boost. Perhaps I was (more than) ready to conquer Emacs all along…

Nibodhika@lemmy.world on 15 Jun 05:34 collapse

If you had started with that people would have told you that nothing comes even close. The closest things you will find are Atom (archived), Sublime (closed source) and Helix (still very new and no plugin support, but something to keep an eye on).

Speaking of obsidian, the reason why it took me forever to start using Silverbullet is that Emacs has org-mode which does most of what Silverbullet/Obsidian do out of the box, plus some other stuff that they don’t do (e.g. excel like tables).

But I wanted something I could edit remotely through my phone and web interfaces are better than using text editors over ssh connections. Also I have migrated from Emacs to Nvim, the reasons are purely ergonomical (pinky fatigue is a real issue) but after switching I found a jump in the way to think about an editor. Emacs is great, don’t get me wrong, and if you decide to learn Emacs I can assure you it will be the best editor you’ve used, but it still edits things at a character level, while there are concepts for matching brackets or quotes changing the text inside quotes in Emacs is very character oriented, I.e. go to start of quote, start marking, move to matching quote, delete, whereas in vim is sort of a higher level language where you say Change Inside Next Quote using cin", and expanded with some plugins you can even do srnq’ to Surround Replace Next Quote with ’ (which will change the quotations on the next text from whatever to '). And that’s a lot closer to the way I think so it skips a mental step (plus it’s a lot less keystrokes and no Ctrl for my pinky).

But those are the reasons why I switched, many people use Emacs for decades without ergonomic issues, whichever of the two you decide to learn you’ll understand why they’re the staple editors for most people who actually choose an editor.

caseyweederman@lemmy.ca on 13 Jun 12:01 next collapse

There’s got to be a Micro plug-in for this.

caseyweederman@lemmy.ca on 13 Jun 12:06 collapse

WAIT, if I’m reading this right, it’s had code folding since last year: github.com/zyedidia/micro/pull/2942
I’m gonna try this right now

HayadSont@discuss.online on 14 Jun 21:39 collapse

Thanks a lot for putting in the work! Uhmm…, how has testing been? Were you able to pull this off with Markdown?

caseyweederman@lemmy.ca on 15 Jun 12:18 collapse

I got distracted. At first glance, it seems that PR was for the groundworks, I haven’t been able to figure out how to actually do it. I’ll try again in a bit.

spacemanspiffy@lemmy.world on 13 Jun 18:42 next collapse

If you don’t want to go the Emacs or Vim routes, try Kate. Neovim is amazing but Kate is too from what I hear. Similar support for LSPs.

HayadSont@discuss.online on 14 Jun 21:51 collapse

It’s not that I don’t want to go with Emacs or Neovim. Rather, I want to explore what else is out there.

As for Kate, thank you for its endorsement! I’ve tried Kate since making this post and it^[Together with KDevelop. Though it has to be noted that KDevelop IIUC seems to rely on Kate for this functionality.] has been the only one which has yielded a desirable result. I can wholeheartedly attest to its quality.

barlog@lemmy.ml on 14 Jun 02:10 next collapse

Look at Helix and Zed.

greywolf0x1@lemmy.ml on 14 Jun 14:01 next collapse

Zed is the goat

HayadSont@discuss.online on 14 Jun 21:57 collapse

Do you happen to have a lot of experience with other text editors (and/or IDEs)? If so, would you like to chime in and compare Zed to the ones you feel confident talking about?

Thanks in advance!

HayadSont@discuss.online on 14 Jun 21:56 collapse

Thanks for the recommendations! Helix doesn’t seem to offer this functionality (yet). Unfortunately…

As for Zed, it does seem to be capable of reproducing the functionality found in the gif (or at least to some extent). However, installing it on my distro isn’t pretty. Therefore, I wish to install it at some point, but I’ll wait it out for now.

the_wiz@feddit.org on 14 Jun 05:13 collapse

ED IS THE STANDARD EDITOR

HayadSont@discuss.online on 14 Jun 22:11 collapse

If you’re not trolling, then I’d like to offer my apologies for assuming you were.

Perhaps I shouldn’t feed the trolls, but I couldn’t resist: does ed even support the functionality demonstrated in the gif above? I’m asking this from a genuine position of ignorance.

the_wiz@feddit.org on 15 Jun 04:04 collapse

Honestly: Yeah, i was trolling (kind of), but:

I DO like to code via ED because the design and workflow of ED (or even better: Sam) makes folding unnecessary because you only put on the screen what is needed right at that moment. Want to see two functions 1000 lines apart? No problem, just print them right below each other on the screen.

HayadSont@discuss.online on 15 Jun 07:00 collapse

Interesting insights. Much appreciated!

I DO like to code via ED because the design and workflow of ED (or even better: Sam) makes folding unnecessary because you only put on the screen what is needed right at that moment. Want to see two functions 1000 lines apart? No problem, just print them right below each other on the screen.

Hmm…, I suppose this is a workflow I’d have to try out for myself before drawing any conclusions. Though, I got some questions:

  • Why ed? Isn’t any other TUI/CLI text editor fit for the job? Apologies if I sound obtuse/obnoxious*. I’m probably just very ignorant of how ed fares compared to the others.
  • Is there any currently maintained version of Sam? A quick search suggests that everyone packaged/grabbed it from this github repo. But, unfortunately, that one has been archived since earlier this year. I suppose I could look into the many forks it has, but I’d rather be picky 😅. Got any pointers for me?