Question

I decided to use NppExec to run my Python files from notepad++, however I encountered a problem. I created a simple script with one line:

python -i $(FULL_CURRENT_PATH)

and added the script to the "Menu items" in nppExec advanced options. The script appears in my macros tab and does what I need when I run it. The problem is I am unable to set a keyboard shortcut to this command. The command appears in my shortcut mapper (under plugin commands) and I can set it to

shift+ctrl+p

but the problem is that it simply does not work when I hit the three keys. The key combination is not the problem, as I was able to create a test macro that ran when I hit shift+ctrl+p.

Edit: More updates: the shortcuts.xml in APPDATA does change when I add the shortcut, the line:

<PluginCommand moduleName="NppExec.dll" internalID="20" Ctrl="yes" Alt="no" Shift="yes" Key="80" />

is added. This is exactly my ctrl+shift+p command, it's there, it just does not fire.

Is anyone else experiencing this strange behaviour? Any help will be greatly appretiated.

Was it helpful?

Solution

Ctrl+Shift+P is by default assigned to Playback command. Notepad++ is buggy when it comes to shortcut mapping, can easily create collisions. See for example open bug #3635.

My suggestion is to try to assign it to something else (personal preference is F5) and double check that it's not already assigned!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top