Notepad++ is one of the most popular text editors in the world. It can edit a large number of file formats. It features syntax highlighting, tabbed interface, powerful search and replace functions and more. Being an open-source program that comes with all these features, it has won over the hearts of almost all the Windows users. Personally, I have been using it for at least last ten years and I have never thought of switching to any other text editor.
Fortunately, starting with the latest version of Notepad++ (version 7.5.9), the developers have added two special command line switches that can be used to replace Windows Notepad with Notepad++. This takes advantage of the debugger feature of Image File Execution Options (IFEO). No files are replaced and no irreversible changes are made to the system. It just requires a single registry value to be added.
Here is how you can replace Windows Notepad with Notepad++ :
- Download and install 64-bit version of Notepad++ from https://notepad-plus-plus.org/. Choose the default installation folder.
- Click on Start, type cmd.exe, right-click on cmd.exe and select Run as administrator. This will open elevated command prompt window.
- Type the following in the elevated command prompt window and then press Enter:
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
- Download and install 32-bit version of Notepad++ in its default location.
- Launch elevated command promt as previously mentioned (click on Start, type cmd.exe, right-click on cmd.exe and select Run as administrator).
- Type the following in the elevated command prompt window and then press Enter:
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%ProgramFiles(x86)%\Notepad++\notepad++.exe\" -notepadStyleCmdline -z" /f
This is it, now Windows Notepad will no longer launch. All attempts to launch Notepad with actually launch Notepad++. If you want to revert back to Windows Notepad, then you can enter the following in the elevated command prompt:
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f
For more information and all the different cases of Notepad++ installation, you can visit the Notepad++ webpage at https://notepad-plus-plus.org/features/replace-notepad.html.