Macros Keep Erasing
-
Ok, so I have never had a problem editing my macros file with regular notepad.exe from windows. I normally goto the directory under appdata\users\ etc and right click the shortcuts.xml file and open with notepad.exe when I have notepad++ closed of course. Well, I right-clicked the file and opened it with notepad++ in error. Did nothing to the file. Just closed the program. Restarted it and my macros are all gone, Completely.
I have tried everything under the sun to restore them. I have always kept a backup file in other directorys in case this ever happened.
I have tried uninstalling program, changing versions, changing registry data that points to anything related to notepad++
Still Nothing works. Everytime I change the file, the macros reset to none. I could start over, but I have many macros that I use on a daily basis.
Any help would be appreciated
Thanks
-
@Joelbow
please post your debug-info.Cheers
Claudia -
Thanks for your response Claudia, where do I begin to do that in Notepad++? Windows 8.1
-
-
Notepad++ v7.3.3 (64-bit)
Build time : Mar 8 2017 - 03:39:58
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS : Windows 8.1 (64-bit)
Plugins : mimeTools.dll NppConverter.dll -
If you open %APPDATA%\notepad++\shortcuts.xml,
you should see at least one entry in macros section<Macro name="Trim Trailing and save" Ctrl="no" Alt="yes" Shift="yes" Key="83"> <Action type="2" message="0" wParam="42024" lParam="0" sParam="" /> <Action type="2" message="0" wParam="41006" lParam="0" sParam="" /> </Macro>
this is the default one which is available after a new install.
Could you just try to duplicate this entry and give it a different name like
<Macro name="Trim Trailing and save" Ctrl="no" Alt="yes" Shift="yes" Key="83"> <Action type="2" message="0" wParam="42024" lParam="0" sParam="" /> <Action type="2" message="0" wParam="41006" lParam="0" sParam="" /> </Macro> <Macro name="Trim Trailing and save2" Ctrl="no" Alt="yes" Shift="yes" Key="83"> <Action type="2" message="0" wParam="42024" lParam="0" sParam="" /> <Action type="2" message="0" wParam="41006" lParam="0" sParam="" /> </Macro>
Save the file - restart npp.
Btw. you can edit macros within npp.Cheers
Claudia -
Ok, well I found the recent macro that I added that was causing all the macros to erase. It may have had some special characters in it causing the macros to crash. That being said, I erased that macro and the rest of them are back up and working. Thanks for helping me out. I have been working on this for days. Even did a system restore etc… and was stumped. I just decided to delete them one at a time. BTW I thought you couldn’t edit the shortcuts.xml file directly while having npp up and running. Am I wrong? Thanks, cheers. Joel.
-
good to see that you managed it.
BTW I thought you couldn’t edit the shortcuts.xml file directly while having npp up and running. Am I wrong?
Not really, it depends which part you modify. Npp saves configuration data when shutting down,
macros aren’t part of it.Cheers
Claudia -
It’s great that your problem is solved, but if you’d provide more detail on the “special characters” in your macro that caused it to crash, we could think about it further, and maybe learn something we didn’t already know.
shortcuts.xml can be edited with Notepad++ as long as you don’t use the Shortcut Mapper functionality to change a shortcut key assignment at the same time (during the same run) as you make other (manual) edits to the file. If you make manual edits AND also use the Shortcut Mapper to make a change during the same run, Notepad++ will (in order to update the key-combo change), write out a new complete copy of shortcuts.xml from what is currently in memory–which will not include any manual edits to the file.