@Tony-Moody,
You must not …
That’s not strictly true. “You must be careful if you …” would be the better way of phrasing that.
C:\Documents and Settings\<username>\Application Data\Notepad++\shortcuts.xml
And I can now identify that you’re on an older Windows, such as Win2k or WinXP. For more on the %AppData%, see our FAQ on the topic – which includes an explanation for how the simplest way to access folders in the user-app-data hierarchy is by %AppData%\FolderName, so you don’t have to know which file hierarchy your system uses.
What I do is record a macro and run it to check. If it needs altering I either record it again or I have a go at editing it. One can add macros together by editing.
Yep, those are good, solid advice.
Editing Configuration Files
As it says in NpWiki++: Configuration Files, “Because Notepad++ updates some of its configuration files on normal program termination, manual editing of a Notepad++ configuration file requires both specific procedures and good knowledge of the files’ layout. It is strongly advised to read about how to edit configuration files and the knowledge base for file layouts.”
The editing configuration files page claims you have to mark the files as read-only, but that’s not technically accurate, either.
Notepad++ will overwrite the shortcuts.xml file when it exits… but only if you’ve recorded a new Macro, or if you’ve used the Settings > Shortcut Mapper or Macro > Modify Shortcut / Delete Macro…. (There may be one or two other circumstances that I haven’t thought of, but if there are, they seem to be more rare.)
A sequence that has always worked for me, every time, for editing the shortcuts.xml from within Notepad++:
Close all active instances of Notepad++.
This will make sure Notepad++ saves any changes it needs to save into shortcuts.xml.
Open one instance of Notepad++.
Do nothing else regarding Notepad++, other than what’s described in these steps, while following these instructions.
Do not open another instance.
Do not change GUI settings, especially the
Shortcut Mapper… or
Modify Shortcut / Delete Macro….
Open %AppData%\Notepad++\shortcuts.xml using that one instance of Notepad++
if you’re in a portable installation, open the local shortcuts.xml instead
Make your edits to shortcuts.xml using that one Notepad++, without opening any other instances.
Save shortcuts.xml
Close that one instance of Notepad++.
When you open Notepad++ again, the changes you made should take effect
if you handcrafted a new macro, or edited an existing one, it should be available in the
Macro menu.
You can also re-load shortcuts.xml to make sure the changes are still in place; they should be (they are for me).
If shortcuts.xml is open, either
Close shortcuts.xml again, so that you don’t expect it to be editable this time,
or
if you do want to safely edit shortcuts.xml more, and haven’t done anything else with Notepad++, you’re effectively back at step #3 right now, and can continue the sequence from there