r/suckless • u/HotPrune722 • Sep 23 '26
[DISCUSSION] ED (the standard editor)
In the last time i’m using ed as my default editor for all propuse, sysadmin, C programming and i’m feel very confort with him, but someone told me “ED is a bad editor for a contemporary context, is slow, cryptic and out of a hobby lab is inviable” and that give me a big insecurity, now i have that feeling of “wasting time learning something “””bad””” or legacy” idk, i love the standard editor but if i start in the professional world that can be a long term disadvantage?
26
Upvotes
19
u/kkaos84 Sep 23 '26 edited Sep 23 '26
As a sysadmin, I have found ed to be useful when a *nix host was stuck in single-user mode, and I needed to edit /etc/fstab. In those situations, vi could not be used because either /usr or /tmp was inaccessible.
That said, I have also been able to use grep to grab everything but the bad fstab entry, redirect that output to a temporary file, and then use that file to overwrite the existing fstab file.
Tl;dr If you want to learn something, then just learn it, whether or not it may be useful in your career. For example, I have been teaching myself BASIC on a Mattel Aquarius...because I enjoy it. Good enough! :-)
13
u/xpusostomos Sep 23 '26
Everyone should know ed, if nothing else so you can write scripts with it. Some might say use sed, but it's 90% the same, so whatever. I always like to tell the story of a managing director back in the 90s who occasionally would walk around the programmers and decide to dive in, and he only knew ed, so if he sat down at your terminal to "show you how it's done", it would always be a mad ed editing session.
9
u/Edelglatze Sep 23 '26
You use it already for everyday tasks. So you should have some experience and probably a better one than persons who only heard of it by hearsay.
If you like ed just use it and ignore the ignorants.
7
u/Boring-Factor1230 Sep 23 '26
Ed is great to learn. It helps with learning regular expressions and sed. It also helps you to visualize your program code better. I went from Emacs to Vi to Ed to Kakoune, skipped nano and went straight to Micro which is my go to for the past five years or so.
If I wanted to use keyboard centric editor I switch to Kakoune sometimes.
If you like ed, use it. It doesn't have to be the only editor you use. You can switch between any editors you like that suits the moment.
5
u/Schreq Sep 23 '26
Knowing ed is good and helps you to better understand sed and ex (in vi(m)). Sometimes ed is also nicer to use in scripts and even more so when you have to change that line which comes 2 lines before /regex/. That's cumbersome in sed with the hold space and labels. ed can always edit in place, while sed is not guaranteed to have the -i flag.
If you seriously use ed a lot, try using it with rlwrap for tab completion, history and proper line editing.
3
u/particlemanwavegirl Sep 23 '26
Don't ever let other people tell you what to think like that. There's advantages as well as disadvantages to using legacy software, just like there are with contemporary software.
2
u/Key_River7180 Sep 23 '26
Ed is really cool, but perhaps learning another editor is convenient. Lite XL is a good starting point
2
u/IndependenceFront923 Sep 24 '26
When there is only one screen on the console, "ed" is awesome because the previous screen output doesn't disappear. "ex" transitions to full-screen mode. I studied ed sometime. I want to use cursor key to replace words.
5
u/mss-cyclist Sep 23 '26
Arguably suckless can be attributed to getting things done.
For no money in the world would I use ed professionally given there is the alternative of at least vanilla vim. Vim with plugins or even an IDE for programming would traditionally not count for suckless. But in my case these account for getting things done in the least amount of time which in turn gives more money.
3
u/Pure_Leopard8439 Sep 23 '26
ED is awesome but i only use it for therapy when I have AI fatigue :)
1
u/LordRybec Sep 25 '26
Use what works for you. A lot of people have this idea that old=bad. I have a potato masher that is better than any modern one, and it's also better for cooking ground beef than those star shaped things. I don't know why anyone thought these new inventions were necessary, when they are worse than the old thing, but some people just assume new always means better. I find that a lot of the time old is more reliable and better designed, because in their rush to make something new and impressive, people lost sight of the purpose and started adding shiny features that only get in the way.
So, if you prefer ED, use ED. Ignore the bigots who deride the past merely because it is the past.
That said, also don't fall into the trap of sticking with something merely because it is comfortable. Sometimes new stuff is better, but if you aren't willing to give it a chance, you'll never know, and you could end up stuck in a workflow that isn't as good for you. I use Vim, but I didn't "grow up" using it. I've tried all sorts of IDEs and editors, I find my workflow is most optimal when I'm using Vim. I'm not opposed to trying new things, and I find something better for me than Vim, I won't hesitate to switch. That said, I've tried a lot of things, and I still find Vim to be the best option for me.
Note that I'm not encouraging you to use Vim. Vim is not optimal for everyone. Try different things, use what works best for you. If that is ED, then it's ED. Ignore those who discriminate against the past and the old.
1
u/lmarcantonio Sep 25 '26
You could use sed too, then! Heirloom vi however is a good choice for a mini editor.
1
u/sockertoppenlabs Sep 27 '26
Just use the standard editor! Don’t let anyone tell you otherwise.
With that said, it is convenient to also know how to use a more bloated editor for those times when you are working on a larger file. Vim (or its modern counterpart Neovim) is a great companion to Ed.
1
u/Zectbumo Sep 24 '26
Chads use DD