Where does it store macro on disk?



  • I experimented with macro, created one and that worked well.

    it is appearing in the menu, and I could replay it.

    However, I want to know where does npp stores macros on disk,
    so that I can copy that macro to store at a safe place in case of reformat of disk/ reinstall of winodws or npp/ transfer to some other pc or other multiboot os/ or just to edit it manually to copy repeated long parts and then make small changes, instead of having to repeat the entire long step.

    Is this information available somewhere in settings or help? At least menu option “edit macro” is very much needed.

    Thanks.

    Rawat



  • If you’re talking about Notepad++ native macros then (in Windows anyway) they are stored in drive:/Users/username/AppData/Roaming/Notepad++ in a file called shortcuts.xml. However, it is not a very ‘editable’ file as most of the ‘code’ is made up of numerical ‘Actions’. I have yet to find anywhere that references these Actions, so creating a macro other than recording keystrokes I think would be difficult.

    Also, it is not really a language than you can program with. There are no looping structures or logical commands. It’s basically just a sequence of these actions.



  • @Nolan-Jorger

    Thank you for your reply to the above post. I was able to copy the shortcuts.xml file to a new install of Notepad++ and my 15 macros showed up. Your post saved me countless hours if I had to recreate these macros again which I use monthly when I update a webpage for my society. Thank you again.


Log in to reply