Live data from Hacker News

My Ed(1) Toolbox

aartaka.me

11–20 of 28 posts

Re: My Ed(1) Toolbox

#13
When even “IDEs are complete overkill—just use vi” sounds like weakness and the entitlement of modern youth, seek out the ed fan pages!

ed isn’t quite flipping binary toggle switches to load your program, but close enough to deliver the joy of brutal minimalism along with a nostalgic waft of yesteryear.

Re: My Ed(1) Toolbox

#14

When even “IDEs are complete overkill—just use vi” sounds like weakness and the entitlement of modern youth, seek out the ed fan pages! ed isn’t quite flipping binary toggle switches to load your program, but close enough to deliver the joy of brutal minimalism along with a nostalgic waft of yesteryear.

  > ed isn’t quite flipping binary toggle switches to load your program, but close enough to deliver the joy of brutal minimalism along with a nostalgic waft of yesteryear.
No, that would be Teco, or, more “all we had were zeros”, ED on CP/M.

ED is, well, miserable. It’s a character editor, vs a line editor, and you had the joys of paging in chunks of your file into working memory.

I, personally, find command line character editors especially difficult. I find it very hard to maintain my context and, of course, who doesn’t just love counting characters for commands.

Re: My Ed(1) Toolbox

#15
I don't use ed interactively but find it's really useful in shell scripts that need to edit files - heredocs or piping printf output (like one example in the article; never felt a need for something like his xed). Even used it in a C program via popen() to edit settings in a config file.

ed is underrated.

(I'm responsible for suggesting GNU ed accept posix EREs; think I got the idea from NetBSD's version)

Re: My Ed(1) Toolbox

#17

I like ed but I prefer 'sam -d' (the terminal mode of Sam). It has a nice looping construct 'x' and you can open multiple files and do batch edits (with 'X'). There is a Go port of Sam, which is easy to install: go install 9fans.net/go/cmd/sam@latest http://sam.cat-v.org/

+1, structural regular expressions are a joy to use.

https://doc.cat-v.org/bell_labs/sam_lang_tutorial/sam_tut.pd...

Also interesting, with other derivates of ed -- LineEditorFamily in the TextEditors Wiki: https://texteditors.org/cgi-bin/wiki.pl?LineEditorFamily

Post reply on HN