Macros dissapeared
-
Hi techies
My macros I have been doing has suddenly dissapeared.
My shortcuts.xml file is located as it always have been.
I installed two plugins; “Column tools” and “Customize toolbar” and then my saved macros has dissapeared.My debug info is:
Notepad++ v7.9.5 (64-bit)
Build time : Mar 21 2021 - 02:13:17
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1879
Current ANSI codepage : 1252
Plugins : ColumnTools.dll DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll _CustomizeToolbar.dll -
When I create a new macro and save it, it doesn’t appear in my shortcuts.xml
The main question is off cause: How do I get Notepad++ to see my file?
-
@Jens-Holme-Bjørneboe said in Macros dissapeared:
When I create a new macro and save it, it doesn’t appear in my shortcuts.xml
I this a new Notepad++ install?
What directory path is the ‘shortcuts.xml’ you are referencing? Based on your debug info (Local Conf mode: OFF) I think the ‘shortcuts.xml’ will be under
%USERPROFILE%\AppData\Roaming\Notepad++
.Did you try launching with the
-noPlugin
command line option to disable all the plugins to see if they are causing the issue? Note that I have both of those plugins installed and can create and save Macros. Also note I’m using the latest release candidate and local config mode is ON for me (meaning my ‘shortcuts.xml’ is in my Notepad++ install folder).Cheers.
-
I now tried to uninstall the program and then re-install, with no luck.
I’ve tried to delete the Shorcuts.xml and the copy my backup information to the new generated file (with no shortcut keys), with no luck.I’m not sure how to start the program with the command line option. Do I need to go to the program folder and create a shortcut to run the file with the option added?
-
@Jens-Holme-Bjørneboe said in Macros dissapeared:
I’ve tried to delete the Shorcuts.xml and the copy my backup information to the new generated file
Where is the ‘shortcuts.xml’ you are talking about? Again, based on your Debug Info, it’s probably not the one in the Notepad++ install directory. Did you try to create a new Macro and save it? Does it show up on a Notepad++ relaunch? If so, it’s being saved in your Shortcuts.xml file - you need to find the “right one” - again, probably in
%USERPROFILE%\AppData\Roaming\Notepad++
.I’m not sure how to start the program with the command line option.
From Windows, use the Start menu, “Run” and run Command Prompt (cmd.exe). For the prompt:
C:\> C:\path\to\your\Notepad++\install\notepad++.exe -noPlugin
Cheers.
-
@Jens-Holme-Bjørneboe, thanks for asking the question and @Michael-Vincent , thanks for answering! I was baffled as to where my macros were going. I checked the “C:\Program Files\Notepad++\shortcuts.xml”, and they weren’t there. I wonder why NPP has 2 ‘shortcuts.xml’ files?
Thanks again!
-
@Aaron-Bishdou said in Macros dissapeared:
I wonder why NPP has 2 ‘shortcuts.xml’ files?
Because it’s designed to read the machine-wide macros (c:\program files\notepad++\shortcuts.xml
) first, then read any per-user macros (from%AppData%\Notepad++\shortcuts.xml
).Second (and maybe a more frequent use case), Notepad++ will copy the program-directory
shortcuts.xml
into the AppData directory when it needs to initialize populate its AppData settings (for example, for a new user, or if someone deletes their old%AppData%\Notepad++\
and to reset to default settings again) -
@Aaron-Bishdou said in Macros dissapeared:
I wonder why NPP has 2 ‘shortcuts.xml’ files?
There’s the possibility to run with your configuration files (of which
shortcuts.xml
is one) in the same folder as the Notepad++ exe, in the %APPDATA% location, or in the “cloud”.A default installation will run from %APPDATA%. The user can change this after installation to run differently, but Notepad++ doesn’t remove the config files from the original place. This generates confusion among users because when they are asked to look in a config file during troubleshooting, they often look in the wrong one.
-
Because it’s designed to read the machine-wide macros (
c:\program files\notepad++\shortcuts.xml
) first, then read any per-user macros (from%AppData%\Notepad++\shortcuts.xml
).I explained it wrong, and thus I struck it out in the original.
Actually what happens is Notepad++ looks in
%AppData%\Notepad++\
for theshortcuts.xml
file, and if it doesn’t find it there, it falls back to the machine-wide copy inc:\program files\notepad++\shortcuts.xml
. -
Had this exact problem.
I just updated n++ using the built-in updater (to 8.6.2) and all my macros are gone, I had created 5… shortcuts.xml are empty (with defaults in them).Also like 30 of previous entries in “Find what” drop down menu are gone… So now it makes really difficult to create my macros.
Very disappointed…
I use duplicati to make backups of notepad++ daily… And it seems macros were not even saved. I just restored from Notepad++/cloud folder and the file content is just the default one.