The release of the text editor Notepad++ 7.5.9 introduces a new feature for Windows to replace the default Windows text editor Notepad as the default system editor.

While users may associate certain file types with Notepad++ so that these files are loaded in the editor and not another one when loaded, there was no direct option until now to replace Notepad as the default text editor during installation of Notepad++ or afterward.

Notepad is a powerful plain text editor that offers lots of features that Notepad does not offer: from the ability to load large text files (which Notepad cannot) over syntax highlighting to powerful search and replace features.

You may use Notepad++ for advanced features such as finding text in all files of a folder or plugin support to extend the functionality further.

Microsoft did add some features to the default editor Notepad in recent versions of Windows 10. The company added support for extended line endings as well as text zooming and better replace functionality.

The developer of Notepad++ added a new option to the program in version 7.5.9 that changes that. The solution is not fully automated as it needs to be run from an elevated command prompt window.

https://www.ghacks.net/wp-content/up...ce-windows.png

Note: The commands below contain path information. You can copy and paste the commands if you have installed Notepad++ in the default location but need to edit the path if you have not.

Here is how that works:

  • Activate the Start menu of the operating system.
  • Type cmd.exe and either
    1. Right-click on cmd.exe and select "run as administrator".
    2. Hold down the Ctrl-key and the Shift-key and select the cmd.exe result.

  • Confirm the UAC prompt.
  • The command prompt window that opens begins with the word Administrator to indicate that it is an elevated command prompt.
  • Users who run a 32-bit version of Notepad++ need to run the following command:
    1. 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

  • Users who run a 64-bit version of Notepad++ need to run the following command instead:
    1. 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

  • You should get "the operation completed successfully as the return message when you run the command.

https://www.ghacks.net/wp-content/up...ult-editor.png

The command changes information in the Windows Registry that replace the default text editor Notepad with Notepad++.

It is possible to undo the replacement at any time by running the following command from an elevated command prompt window (use instructions above to open one):

  1. reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /f