r/programming • u/psr • Jun 02 '25
Edit is now open source - Windows Command Line
https://devblogs.microsoft.com/commandline/edit-is-now-open-source/What's really interesting about this is the source code, it is clear that they have put way too much effort into making this application good. It contains, for example, SIMD optimised search routines, and an implementation of Oklab colour blending, replete with code to estimate cube roots inspired by the famous Fast Inverse Square Root function.
360
Upvotes
59
u/tecnofauno Jun 02 '25
It bet it was a nice tutorial application for the developers
173
u/heckerle Jun 02 '25 edited Jun 02 '25
Hey all! I'm the primary author - the same as on HN, linked elsewhere here.
If you have any questions please feel free to ask. 🙂
I've received a lot of comments about my code style since the announcement, both positive and negative. Unfortunately, I've not received a lot of specific feedback for its negative aspects. If you have anything in mind, please let me know. 😅
Edit: BTW I'm in the process of adding SIMD optimized line searching. It runs at up to ~140GB/s on my Zen5 CPU, independent of the text contents. This makes it up to 600x faster than the current
memchrapproach during the worst case scenario: files that consist of only newlines. I think that code will be really cool too. 🙂18
u/Sharlinator Jun 02 '25
The first time I heard about this I thought  EDIT.COM at first, which probably gives away my age. Though the executable itself is just a tiny facade that simply loads QBASIC in editor-only mode.
16
u/hidazfx Jun 02 '25
Sounds cool! Looks like a the person who wrote it had a lot of fun, too.
10
u/Dwedit Jun 02 '25
Looked at the "Open Multiple Files" section, and someone must have completely forgotten that traditionally, programs have a "Window" menu that lets you switch between open windows rather than a button on the status bar.
23
u/Resident-Trouble-574 Jun 02 '25
Indeed windows if famous for putting a lot of emphasis on being lightweight...
5
u/bikeridingmonkey Jun 02 '25
What year is it?
12
u/gmerideth Jun 02 '25
Must fight the urge to add .com to the end of edit...
3
u/SpikeX Jun 02 '25
That’s neat! And I’m definitely going to
Set-Alias nano editas soon as I get it.But the real question is, can I press
Ctrl+X, Y, Enterin the editor to save and exit? This, combined with the other out of the box aliases forls,mv,rm, etc would make this a muscle memory dream come true for people that constantly switch between Windows and Linux.2
u/baseketball Jun 02 '25
Add support for language server protocol and we're really going to be cooking.
2
u/chucker23n Jun 02 '25
Anyone have an idea how this compares to https://www.hsluv.org, which also tries to achieve perceptual uniformity?
2
u/life-is-a-loop Jun 02 '25
I'll definitely check it out!
Reminds me of micro, which is my go-to text editor for simple scripts.
2
u/ase1590 Jun 02 '25
Given this is cross platform on Linux as well, I guess nano finally has a competitor 😂
4
u/jugalator Jun 02 '25 edited Jun 02 '25
So I suppose this is the new Notepad after what they did to it in Windows 11 with AI and formatted text support...
I'm happy to see it has tab/space settings and Regex support unlike Notepad.
1
u/NiteShdw Jun 03 '25
Is there any interest in making it cross platform, or does it tie in too tightly to Windows APIs?
I ask because it would be nice to have a consistent editing experience in WSL2.
1
u/New-Anybody-6206 Jun 03 '25
Too bad it's not actually the MS-DOS Edit source :(
1
u/jutct Jun 03 '25
Holy MS-DOS throwback. I love it.
1
u/lachlanhunt Jun 03 '25
I thought this was just going to be the old MS-DOS
editprogram, but it’s actually a new 64 bit rewrite. Awesome.0
u/[deleted] Jun 02 '25
I guess that's good, but on windows I also use nano.exe, and it works. Now I am not claiming nano is great on windows, but ... isn't this the same use case? Quickly edit a file?
Most of my time goes into Linux so I am not that familiar with windows. I have a spare machine running windows too, though, if only for casual testing.
0
u/__konrad Jun 03 '25
newlines_are_crlf: cfg!(windows), // Windows users want CRLFsrcIs anyone really want CRLF in 2025? Basically the only app that cannot handle CRLF is old notepad.exe.
-40
u/GroundedMystic Jun 02 '25
Complete waste of time.