How-To
Finally, an Official Command-Line Editor for Windows
At the Microsoft Build conference this year, the company announced it will include a command-line text editor with Windows!
This was followed up in a Windows blog post.
We are introducing a command-line text editor, Edit on Windows which can be accessed by running "edit" in the command line. This enables developers to edit files directly in the command line, staying in their current flows and minimizing context switching. It is currently open source and will be available to preview in the Windows Insider Program in the coming months.
I was very excited about this announcement. For years, I have wanted, yearned, and lusted for Windows to include a command-line editor. Yes, they did have one back in the day, but modern Windows versions do not include one.
There are some great third-party command-line editors out there. I am a huge fan of Vim, and Nano is extremely popular, but these must be downloaded and installed, which is not always possible or convenient when working on someone else's system.
Installing Edit
As Edit is not yet included with Windows, you will need to get and install it from its GitHub repository.
You can download the latest release from GitHub. It has binaries for Arm (aarch64) and x86 architectures for Windows and Linux.
[Click on image for larger view.]
As I was using a Windows 11 machine, I downloaded the edit-1.0.0-x86_64-windows.zip file.
I extracted the files (edit.exe and edit.pdb) from the zip file.
These files will need to be in a folder that is in your command line path.
Tom's Tip: Bring up a command line window and enter path to see what directories are in your path.
[Click on image for larger view.]
I used File Explorer to copy the edit.exe file to C:\Windows\system32.
I then verified that the command was in the path by entering where edit in the command line.
[Click on image for larger view.]
Using Edit
I brought up Edit by entering edit in the command line window.
[Click on image for larger view.]
The help button was of little help as it only displayed the build that I was on.
The edit tab on the ribbon only has basic edit commands like cut, paste, and find.
[Click on image for larger view.]
You can use the mouse or the ALT key to access the ribbon function. For example, to access the File menu, press ALT F. You can use the CTRL key to access specific functions. For example, to find text, press CTRL F.
The Find function lets you match case and whole words, and my favorite is that it allows you to use regular expressions (Regex). Regular expressions are extremely powerful and helpful for finding text in a file. Programmers and system administrators use regular expressions because they efficiently search, match, and manipulate complex patterns within text.
In the example above, the regular expression searches for "sad" or "fsd." You can specify text that starts (^ak) or ends on a line (dfj$), that contains a specific number of characters between another character (mi.....ft) and other complex text patterns.
The editor allows you to work on multiple files in a single session. Press CTRL P to select the file you want to work on.
[Click on image for larger view.]
You can pass a file argument to edit when you start it.
[Click on image for larger view.]
Joy?
After working with Edit for a while, I will still use Vim for heavy text editing for the time being due to Edit's minimal basic functionality. However, as this is its first release, that is understandable. As it is open source, I am sure it will gain functionality over time and will be invaluable in situations where other editors can be downloaded and used.
I have used command-line editors for most of my career, starting with IBM's ISPF editor. I could never figure out why Microsoft did not include one, but Edit might correct that omission.
About the Author
Tom Fenton has a wealth of hands-on IT experience gained over the past 30 years in a variety of technologies, with the past 20 years focusing on virtualization and storage. He previously worked as a Technical Marketing Manager for ControlUp. He also previously worked at VMware in Staff and Senior level positions. He has also worked as a Senior Validation Engineer with The Taneja Group, where he headed the Validation Service Lab and was instrumental in starting up its vSphere Virtual Volumes practice. He's on X @vDoppler.