You can restart Notepad++ manually by closing all instances of the application and reopening it from your Start Menu or a shortcut.
There is no single "Restart" command built into the Notepad++ user interface by default, but there are several advanced methods to automate the process for greater efficiency, including creating a custom command, using third-party software, or forcing a restart via the Task Manager.
The basic restart: Close and reopen
This method is the most straightforward and requires no special configuration. It ensures a clean shutdown and startup, which can help resolve minor glitches or complete the installation of new plugins.
- Save your work. Notepad++ is good at remembering unsaved files between sessions, but it's best to manually save any important changes before closing.
- Close all Notepad++ windows.
- Click the X button on each window.
- Alternatively, go to File > Exit from the main menu.
- If you have multiple windows open, you may need to repeat this step until all are closed.
- Relaunch Notepad++.
- Find the Notepad++ icon in your Start Menu or on your desktop and click it to open a fresh instance.
Advanced restart methods
For users who frequently need to restart Notepad++, these more advanced methods can be significant time-savers.
1. Create a custom restart command
By adding a custom command to Notepad++'s Run menu, you can create a single-click or keyboard shortcut to perform a restart.
- Go to
Run>Run...in the main menu. - Enter the restart command. In the dialog box, type the following:
cmd /c taskkill /im notepad++.exe & start "" "$(NPP_FULL_FILE_PATH)"- This command ends all
notepad++.exeprocesses and then immediately starts a new one.
- This command ends all
- Save the command.
- Click the Save... button.
- Name the command "Restart Notepad++".
- Assign an optional keyboard shortcut, like
Ctrl + Alt + R. - Click OK to save.
- How to use it: From now on, you can simply go to Run > Restart Notepad++ or use your assigned keyboard shortcut to quickly relaunch the application.
2. Use a third-party automation tool (AutoHotKey)
For even more customization, you can use a free, third-party scripting utility like AutoHotKey to create a powerful, system-wide shortcut.
- Install AutoHotKey. Download and install the software from its official website.
- Create a new script. Right-click on your desktop, select New > AutoHotKey Script, and open the new file with Notepad++.
- Add the script. Enter the following code into the file and save it:```
; Restart Notepad++
#IfWinActive ahk_class Notepad++
^!r::
Send !{F4}
Sleep, 500
Run notepad++
return
#IfWinActive
- `^!r::` designates the `Ctrl + Alt + R` shortcut. - `Send !{F4}` closes the active Notepad++ window. - `Sleep, 500` waits for half a second to ensure the process has ended. - `Run notepad++` launches a new instance. - Run the script. Double-click the saved
.ahkfile to run it. The shortcut will now work whenever a Notepad++ window is active.
3. Force a restart with the Task Manager
This method is for when Notepad++ becomes unresponsive and cannot be closed normally.
- Open Task Manager. Press
Ctrl + Shift + Escon your keyboard. - Find the process. Navigate to the Processes or Details tab.
- End the task.
- Locate all entries for notepad++.exe.
- Right-click each one and select End task.
- Relaunch the application. Open Notepad++ normally from your Start Menu.
4. Restarting to change user privileges
Sometimes, you need to restart Notepad++ with administrator privileges to save files in protected directories, or restart as a normal user to fix a permission-related issue.
To restart as administrator:
- Close all instances of Notepad++.
- Right-click your Notepad++ shortcut or Start Menu icon.
- Select Run as administrator.
To restart as a normal user (if it was running as admin):
- Close all instances of Notepad++, including any running as an administrator.
- Open Notepad++ normally from your shortcut or Start Menu.
Understanding session management and auto-reloading
Notepad++ is designed to remember your session by default, meaning it saves all open files and their content when you close it.
- Session saving: When you restart Notepad++ through any of the above methods, your previously opened files and unsaved changes will reappear upon reopening, so there's no risk of losing data.
- Automatic reloading: For dynamic files like log files, you can enable silent auto-reloading. Go to Settings > Preferences > MISC and check the "Update silently" box under the "File Status Auto-detection" section. This will prevent a pop-up and automatically refresh the file whenever changes are detected externally.
When is a restart necessary?
A restart is not required for many common operations, but it can be beneficial in several scenarios:
- Plugin installation: Most plugins require a restart to be fully enabled after installation.
- Settings changes: Some settings, like changes to localization or the menu bar appearance, require a restart to take full effect.
- Troubleshooting: If Notepad++ is behaving erratically, a restart is often the first and most effective troubleshooting step.
- Restoring from a crash: Following a crash, a restart can help restore any temporarily saved recovery data and return the program to a stable state.