Each .txt file is configured to open directly in Notepad by default. This is something we can change, to use NotePad ++ or another text editor instead. It is not something that can be done easily, but we will have to do the work with the help of the Command Prompt, a custom script or a dedicated application.
Notepad and NotePad ++, why switch?
Windows has its own default text editor called Notepad. Every time we want to open a .txt file, it will open automatically with this tool. It is a useful application as well as being excessively simple, with competitors in the market also free and more complete such as NotePad ++. This program has different editing tools that the Windows application lacks, such as being able to edit large text, simultaneous editing, search for text in all the files in a folder, mark files, customizable hot keys, etc. .
That is why, in terms of features, Windows Notepad is far behind applications such as NotePad ++, so many users may find it interesting to be able to replace one with another. In addition, it is a very light application that barely weighs 5 MB and that we can download for free from your Web page. To make this change, Windows does not offer an easy way to do it, as Notepad is a system-protected application. To help you with the work, we tell you the different ways that we can use to replace Notepad with NotePad ++ or another editor that we prefer.
Ways to replace Notepad with NotePad ++
Next, we are going to check different ways we have to be able to change the default text editor, Notepad, to NotePad ++. For this we can use a command from the Command Prompt, use the Registry Editor or a third-party application.
Executing a command
The easiest way to replace Windows Notepad with the NotePad ++ editor is to run a command using the Command Prompt. For this we are going to write cmd in the search box of the Start menu and run the Command Prompt with administrator rights. In the new window we write the following command (with the bars set as shown in the image) for the 32-bit version and press Enter.
reg add "HKLM/Software/Microsoft/Windows NT/CurrentVersion/Image File Execution Options/notepad.exe" /v "Debugger" /t REG_SZ /d "https://www.softzone.es/"%ProgramFiles(x86)%/Notepad++/notepad++.exe/" -notepadStyleCmdline -z" /f
In the event that we want to use the 64-bit version the command would be:
reg add "HKLM/Software/Microsoft/Windows NT/CurrentVersion/Image File Execution Options/notepad.exe" /v "Debugger" /t REG_SZ /d "https://www.softzone.es/"%ProgramFiles%/Notepad++/notepad++.exe/" -notepadStyleCmdline -z" /f
Once this is done and the process is finished, a message should appear indicating that all the change has been made successfully. In the event that we wish undo the changes made, we will simply have to execute the following command from the Command Prompt:
reg delete "HKLM/Software/Microsoft/Windows NT/CurrentVersion/Image File Execution Options/notepad.exe" /v "Debugger" /f
From the Windows Registry Editor
In order to make a text file open with NotePad ++ instead of Notepad, we can do so by modifying a registry key that will be responsible for changing Notepad.exe (Notepad) to Notepad ++. Exe (NotePad ++). We must bear in mind that if we make changes incorrectly in the Windows Registry Editor, it can cause stability problems, so we should use it only if we feel comfortable using it and always under the responsibility of each user.
To access the Registry, press “Windows + R” and the “Execute” command will be launched. Here we write “Regedit”. Once in the Registry Editor we must navigate to the following path:
HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Windows NT / CurrentVersion / Image File Execution Options (IFEO)
Next, from the “Image File Execution Options” folder, right-click and select “New” and “Key”, assigning it the name of notepad.exe.
Subsequently, we right click on this new folder and select “New” and “String value”. We will assign the name of the new created value Debugger.
Now, we double click on it and paste the following text in its value data field
"C: / Program Files (x86) / Notepad++ / notepad++.exe" -notepadStyleCmdline -z /ff
Finally, we must see how the key “notepad.exe” has a value “Debugger” with the address we have entered, as shown in the following image. With this every time we start Notepad, NotePad ++ will open instead.
Use the Notepad Replacer app
It is also possible to use a third-party application such as Notepad Replacer, through which we will be able to replace Notepad automatically without the need to make modifications to the registry. To do this, we will only have to download the program from your website and run it.
Once the installation begins, we must select the location where the Notepad ++. Exe file is located in the following path:
C: / Program Files (x86) / Notepad++ / notepad++.exe
Then we just have to click on «Next» and «Install» for the program to take care of replacing the Notepad with NotePad ++.
Associate TXT files with NotePad ++
Many users may not need to replace Notepad with NotePad ++ and just simply associate the text files so that they are opened directly by NotePad ++. In this way we manage not to have to lock the Notepad and we can open it manually when we need it.
In order to associate the .txt files with NotePad ++ we must create a text document on the desktop. Later we will right click on the file and click on «Properties». Next, click on the “Change” button and select NotePad ++ from the list of applications that are displayed and click OK.
If it does not appear in the list, click on “More applications” and “Search for another application on the computer”.
Now we must select Notepad ++. Exe. For this we must navigate to the following route:
C: / Program Files (x86) / Notepad++ / notepad++.exe