Replacing Notepad with Microsoft Edit for Text Files via the Terminal

If you often find yourself opening .txt files in Notepad and would prefer to use Microsoft Edit (often referred to as edit.com), it’s possible to set this up through the Windows Command Prompt or Terminal. By making this change, you can streamline your workflow and launch text files with your preferred editor effortlessly.

What is Microsoft Edit?

Microsoft Edit is a text editor that allows for basic text manipulation and is a part of older Windows operating systems. While it’s not as feature-rich as modern editors, it provides a simple interface for text editing directly from the command line. For users who appreciate a more straightforward editing experience or want to work strictly within the terminal, it’s a practical alternative to Notepad.

Setting Up Microsoft Edit as Your Default Text Editor

To replace Notepad with Microsoft Edit for opening .txt files, follow these steps:

  1. Locate Microsoft Edit:
    First, ensure that Microsoft Edit is accessible from your terminal. In older versions of Windows, it’s often located in C:\Windows\System32, but you can confirm its presence by running the following command in the Command Prompt:
   where edit.com
  1. Edit File Associations:
    You will need to change the file association settings to redirect .txt files from Notepad to Edit. This can be done using the assoc and ftype commands. a. Open Command Prompt:
  • Press Win + R, type cmd, and hit Enter. b. Set the File Association:
  • First, associate .txt files with a new file type. Enter: assoc .txt=txtfile c. Set the File Type Command:
  • Next, define the command that will be executed when opening a txtfile. Enter: ftype txtfile="C:\Windows\System32\edit.com" "%1" If you have installed Microsoft Edit in a different directory, make sure to adjust the path accordingly.
  1. Testing the Setup:
    After making the changes, verify that your setup works. You can do this by simply double-clicking a .txt file in Windows Explorer. If the changes have taken effect, it should open in Microsoft Edit instead of Notepad.
  2. Using the Terminal:
    You can also open .txt files from the terminal. Navigate to the directory where your .txt files are located and type:
   edit filename.txt

Replace filename.txt with the actual name of your text file. The file should now open in Microsoft Edit.

Conclusion

By following these simple steps, you can replace Notepad with Microsoft Edit for handling your .txt files directly from the Terminal. This setup not only allows for a customized text editing experience but also enables efficient handling of text documents directly from the command line. Whether you’re looking for a nostalgic throwback or just prefer the simplicity of Edit, this change is a quick way to optimize your text editing workflow in Windows.

Add comment

Your email address will not be published. Required fields are marked *