Comment by eurleif

1 day ago

The documentation doesn't make this entirely clear, but I think these are two separate things: the original `edit` command which is built into Windows 11 (and has been built into prior Windows releases), and a replacement written in Rust that can optionally be installed.

Note that my link is dated 2023, whereas Wikipedia says that Microsoft Edit was first released in 2025: https://en.wikipedia.org/wiki/MS-DOS_Editor

The old EDIT never shipped with any 64-bit Windows IIRC, since it was a 16-bit MS-DOS application. I believe 32-bit Windows 10 has it..?

As someone who (mercifully) only occasionally has to touch Windows machines, I keep forgetting this, and then when I try to do stuff I’m flabbergasted that the operating system does not include a terminal text editor. (In a fit of pure desperation I even typed EDLIN into the Command Prompt — no go ;)

That was the case with Win11 about a year ago; if they finally started shipping EDIT64 then hey, that’s one positive recent change in Windows I suppose.

  • Well, there was a workaround (that I only learned today) for creating new files:

        copy con file_to_edit.txt
    

    Type text, end with CTRL+Z. Don't make any typos.

    That's what web search told me, but then looking at the remarks in docs for `copy`[0], I have to wonder if this works now, and if it would've worked back then:

        copy prefix.txt+con+suffix.txt output.txt
    

    If it does, then combined with some clever use of `find`, `findstr` or `for` (whichever was available back then), you could probably get something that's half-way between EDIT.COM and a line editor.

    (`more` would come in handy here, but AIUI, there's no way to run it non-interactively in cmd.exe? Don't have a Windows machine handy to check it right now.)

    --

    [0] - https://learn.microsoft.com/en-us/windows-server/administrat...

    • copy prefix.txt+con+suffix.txt output.txt

      This does indeed work in proper MS-DOS. Congratulations for figuring out probably the single most masochistic way of accomplishing text editing ;)

Thanks, this explains the mystery, and now the timelines add up.

So it turns out, EDIT.COM was one of the first - if not the first - computer programs I ever saw and used, back when the first PC showed up in the house. For some reason, someone in the family guessed that 9yo me will be interested in DOS and QBasic. A few years later, I used it from Windows for some time, when I was learning X86 assembly (I wanted to learn how to make a video game, so I went to the local library looking for some "intro to programming" book, and mistakes were made).

Afterwards, it was Borland C++ 3.1 (another TUI classic) and vim/Emacs, and I forgot about EDIT.com entirely. This new Microsoft Edit is something new, and something else, but similar enough that it brought those memories back.

Thanks again!