Microsoft Releases Classic MS-DOS Editor for Linux Written in Rust
103 comments
·June 25, 2025jksmith
dleslie
For those curious, here is a modern port of the C++ Turbo Vision that also supports Unicode:
san1927
lmao is any body still using turbo cpp?
nathell
array[1..25, 1..80] of Word absolute $B800:0000.
Arrays in TP were laid out in row-major order, and each character was represented by two bytes, one denoting the character itself and the other the attributes (foreground/background color and blinking). So, even better, array[1..25, 1..80] of packed record ch: char; attr: byte end absolute $B800:0000.
Replace $B800 with $B000 for monochrome text display (mode 7), e.g., on the Hercules.
throwaway127482
I am curious about how you made money with it, if you don't mind sharing.
jksmith
My first company out of uni was a company that sold a tv advertising application written in dos. It did all the reports, put together spot advert packages, measuring reach and frequency, cost per point, etc. Used Neilsen ratings for data. The company at the time paid commissions along with salary to programmers. The app still lives on in windows, but I've been out of that game for decades. Written in TP for dos, then Delphi for windows.
TheAmazingRace
Honestly dude, this is clever. Good on you for finding an opportunity to make a useful tool and you made out like a bandit in the process. :)
red_admiral
Now I'm waiting for EDLIN but with unicode.
I remember you could use it in a batch file to script some kinds of editing by piping the keypresses in from stdin. Sort of a replacement for a subset of sed or awk.
I haven't tried but this should be possible with vi too. Whether that is deeply cursed is another question.
gnubison
I think ed is what you’re looking for (possibly with -s).
orsenthil
So much excitement that this got posted 3 times in a week
1. By the author - https://news.ycombinator.com/item?id=44034961 2. Ubuntu Publication - https://news.ycombinator.com/item?id=44306892
And this post.
johannes1234321
There is also this: https://news.ycombinator.com/item?id=44341462
pulkitsh1234
Geniunely curious, how projects like these get approved in an org at the scale of Microsoft? Is this like a side project by some devs or part of some product roadmap? How did they convince the leadership to spend time on this?
dark-star
As they explained, they needed a text editor that works in a command line (for Windows Core server installs), works across SSH (because for a while now Windows included an SSH Server so you can completely manage it through SSH), and can be used by non-vi-experienced Windows administrators (i.e. a modeless editor).
llarsson
Telling people to use nano would of course have been next to impossible. Much easier to rewrite a DOS-era editor in Rust, naturally.
red_admiral
This way gets coolness points, HN headlines, makes the programmers who wrote it happy, and probably is a contribution to making a couple of autistic people feel included.
Rust + EDITOR.COM is kind of like remaking/remastering an old video game.
dark-star
does nano support mouse usage? It doesn't seem to work for me (but maybe it just needs to be enabled somewhere)
I guess they thought that inheriting 25 years of C code was more trouble than designing a new editor from scratch. But you'd have to ask the devs why they decided to go down that route
pxc
I used to recommend micro[1] to people like those in the target audience of this editor. I wonder if that should change or not.
--
smartmic
There is also dte[1]. It hits exactly the same notch and offers an extremely lean editor with Unicode support, CUA key bindings and much more. It has replaced nano as my terminal editor.
prmoustache
Last time I checked, micro should have been called macro based on the binary file size.
seabrookmx
IMO it should not.
`edit` doesn't even support syntax highlighting (atleast, out of the box when I tried it).
_flux
It might in the future, though, as the main developer has opened an issue about it: https://github.com/microsoft/edit/issues/18
The trick is doing it while keeping the binary size small, so tree sitter is not an option.
gadders
Do Edlin next.
Reminds me of my days on a support line.
"Type edit autoexec.bat....." etc
anyfoo
Fun. I must admit I don't really know who this is for, but it seems fun.
tim--
It's for people that want to use the Windows Terminal to edit files. The old `edit` command has been unsupported on Windows since 2006, so there was no Microsoft-provided editor that could be used in the command line since then.
It's impressive to see how fast this editor is. https://github.com/microsoft/edit/pull/408
> By writing SIMD routines specific to newline seeking, we can bump that up [to 125GB/s]
_verandaguy
Is... this a meaningful benchmark?
Who's editing files big enough to benefit from 120GBps throughput in any meaningful way on the regular using an interactive editor rather than just pushing it through a script/tool/throwing it into ETL depending on the size and nature of the data?
magicalhippo
At work we have to modify some 500 MB XML's every now and then, as the source messes them up in non-repeating ways occasionally.
Typically we just hand edit them. Actually been pleasantly surprised at how well VS Code handles it, very snappy.
tiagod
I have to scroll through huge files quite frequently, and that's the reason I have Sublime Text installed, as it deals with them very well.
WD-42
Who cares? It’s fun. Programming can be fun.
tim--
As a specific benchmark, no. But that wasn't the point of linking to the PR. Although the command looks like a basic editor, it is surprisingly featureful.
Fuzzy search, regular expression find & replace.
I wonder how much work is going to continue going into the new command? Will it get syntax highlighting (someone has already forked it and added Python syntax highlighting: https://github.com/gurneesh9/scriptly) and language server support? :)
anyfoo
Not on the regular, but there are definitely times I load positively gigantic files in emacs for various reasons. In those times, emacs asks me if I want to enable "literal" mode. Don't think I'd do it in EDIT, though.
tomrod
Challenge. Accepted.
cerved
Probably more like need to use it. Basically nano for windows
DrJokepu
It’s right there in the readme actually:
> The goal is to provide an accessible editor that even users largely unfamiliar with terminals can easily use.
scblock
That may be the written goal, but I doubt that's the actual reason the project exists.
cosignal
Yeah ... I don't think there's any overlap between "users largely unfamiliar with terminals" who want something easy to use, and 'Linux users who are sufficiently technical that they would even hear about this repo'.
justsomehnguy
My guess would be there are some people at MS who, somehow, still can do something fun. Because they are not assigned on the another project on how to make OOBE even more miserable.
/rant Today I spent 3 (three) hours trying to setup a new MSI AIO with Windows Pro. Because even though it's would be joined to the local ADDS and managed from there - I need to join some Internet connected network, setup a 3 stupid recovery questions which would make NIST blush and wait another 30 minutes for a forced update download which I cannot skip. Oh, something went wrong - let's repeat the process 3 times.
Gormo
There are already plenty of those, such as jed, mcedit, etc.
This particular application is incredibly basic -- much more limited than even EDIT for DOS.
cool_beanz
Nano gang
z3ratul163071
this is for me, as saner replacement for nano in the terminal, since i hate vi.
iknowstuff
I’ll gladly replace vim with it, especially if it has/gets LSP support or searching via ripgrep. I’m using Helix now but like a good tui.
kgwxd
It's a huge improvement over notepad
pcunite
Back in 1993, I would open up binary files in edit and enjoy seeing hearts.
samplatt
That, the DOS defrag visualisation, and the hex-editing my own savegames is pretty much why I'm a developer today.
andrewstuart
I love edit.
It was my favorite editor back in the old days.
It worked, did the basics really well and got the job done. Glad to see it’s back.
tempire
fake. it's not blue.
90s_dev
I don't understand why they want to go with DLLs for scripting instead of WASM + wamr which is really small. Maybe I'm just really inexperienced in this space.
vunderba
The possibility of using WASM was at least under discussion last month:
LAC-Tech
Needs LSP and Tree-Sitter :)
This is just a "because I wanted to" project. And I get that; done a lot of those myself just to understand what the hell was going on. But the rewrite of turbo vision into FPC and compiling to half a dozen targets has been around for 20 years. Turbo vision is probably the best text mode windowing library in existence. The cool fun kicks in when you can map a whole text screen to an array like so: var Screen: Array[1..80,1..25] Of Byte Absolute $B800; // or something like that as i recall
What turbo vision brought to the game was movable, (non) modal windows. Basically a lot of rewriting that array in a loop. Pretty snappy. I made a shitload of money with that library.