In Notepad++ how can I execute a script (like using F5) but with every save (Ctrl + S)

notepad

I am doing something like this in my F5 command (execute):

C:\Python27\pythonw.exe G:\my_python_script.py

I want to run this script everytime I save the file. When I save this command as Ctrl + S, Notepad++ does not run it, only saves my file.

Best Answer

If you use the NppExec plugin, the following macro will do what you want:

npp_save
C:\Python27\pythonw.exe G:\my_python_script.py

This can be bound to any key combination, does not rely on any existing shortcuts, and will bring up a save dialog if necessary.

Related Question