What is Edit?
Edit is a new command-line text editor in Windows. Edit is open source, so you can build the code or install the latest version from GitHub!
This CLI text editor will be available to preview in the Windows Insider Program in the coming months. After that, it will ship as part of Windows 11!
How to use Edit
Open Edit by running edit
in the command line or running edit <your-file-name>
. With this, you will be able to edit files directly in the command line without context switching.
What are Edit’s features?
Edit is still in an early stage, but it has several features out of the box. Here are some highlights!
Lightweight
Edit is a small, lightweight text editor. It is less than 250kB, which allows it to keep a small footprint in the Windows 11 image.
Mouse Mode Support
As a modeless editor with a Text User Interface (TUI), all the menu options in Edit have keybindings (which you can see next to the menu options).
Open Multiple Files
You can open multiple files in Edit and switch between them with Ctrl+P (or by clicking the file list on the lower-right).
Find & Replace
You can find and replace text with Ctrl+R or select Edit > Replace in the TUI menu. There is also Match Case and Regular Expression support as well.
Word Wrap
Edit supports word wrapping. To use Word Wrap, you can use Alt+Z or select View > Word Wrap on the TUI menu.
Why build another CLI editor?
What motivated us to build Edit was the need for a default CLI text editor in 64-bit versions of Windows. 32-bit versions of Windows ship with the MS-DOS editor, but 64-bit versions do not have a CLI editor installed inbox. From there, we narrowed down our options…
Many of you are probably familiar with the “How do I exit vim?” meme. While it is relatively simple to learn the magic exit incantation, it’s certainly not a coincidence that this often turns up as a stumbling block for new and old programmers.
Because we wanted to avoid this for a built-in default editor, we decided that we wanted a modeless editor for Windows (versus a modal editor where new users would have to remember different modes of operation and how to switch between them).
This unfortunately limited our choices to a list of editors that either had no first-party support for Windows or were too big to bundle them with every version of the OS. As a result, Edit was born.
Happy Editing!
Edit will be rolling out to the Windows Insider Program in the coming months. Edit is now open source, so you can build the code or install it from our GitHub repository.
If you have any feedback or questions, please reach out to the team on the official Edit repository!
Now, what is it good for?
Do you expect lots of people to log into Windows via ssh?
When using RDP, VSCode is likely a better alternative and I am sure edit won’t run in PowerShell remoting (since it does not support interactive programs at all, as I understand).
Does it work in Server Core and VSCode doesn’t? That would be a good use case.
Or are we finally (again, after the death of Nano Server) getting a small footprint no-GUI Windows Server?
Christopher, hats off to you and the team. I know this was a lot of work, and I understand many of you invested a lot of your own time developing this. It’s light, performant and works exactly as designed.
Do not listen to these knuckleheads prattling on about syntax highlighting! This is a lightweight text editor, not an IDE. To Microsoft’s credit, it is open source. They can fork it if they like!
The addition of a lightweight CLI text editor to Windows seems like a win on its own. It was always odd that Windows had none. Some of us are just happier in the command line. Having to go out to notepad.exe every time I needed to edit a basic script hurt my soul. Credit to Microsoft for adding this, and extra points for making it open source.
Now I can uninstall vim. Although it
edit myfile.md
provides a similar expirence tonotepad myfile.md
, I really like to stay in the terminal.For me, when dealing with simple task, I will use EDIT, for some medium weight task I will use notepad, otherwise VScode.
my vscode starting time typically exceeds 3s. so not each time use it to open file.
I believe that syntax highlighting is necessary for a tui editor.
PS, we already have a cross-platform nano-like editor named micro, with built-in syntax highlighting for many languages. However, it’s 11 mb in size, and its startup is too slow.
https://github.com/gurneesh9/edit
Added syntax highlighting to it for python
A C# Hello World console app with ahead of time compilation is >5 MB in size.
Edit is 230 KB in size.
I am a .NET dev myself and I love publishing my apps with AoT. But sometimes file size does matter.
OMG! Edit.com from MS-DOS is back!! Excellent.
Have you heard about AOT compilation on C#? Runtime is optional nowadays. Your knowledge about .NET and C# it’s outdated, so don’t comment about what you don’t master.
Looks similar to VIM
This is a godsend for us Linux users! It’s much better than vi or nano! Helps to keep using acquired muscle memory from Vs code! Good job guys!
This is a godsend for computational biologists where we have to open massive text files and inspect them. Given how bloated the new windows 11 has become – even the enterprise editions, this is a really great addition.
Would really love if it comes with syntax highlight for quick and dirty edits, plus highlight support for csv / tsv files.