Bulk-Export Macros in TeXstudio

exportimportmacrostexstudio

I have a collection of macros that I use. I want to export them, then import them on another computer.

I'm looking for some way to bulk-export my macros.

There are two highly-related questions, but unfortunately neither solves my issue.

The first one only allows me to export a single macro at a time. That's super boring, as I have quite a few. (I guess I could set up and AutoHotKey macro to export my TeXstudio macros!)

The second claims that the macros are stored in texstudio.ini. This doesn't appear to be the case. The post is from 2014, though, so maybe it was true then, but isn't now. Looking in this .ini file, I can see that my macros simply aren't in there. Moreover, I did try copying the .ini file over anyway, backing up the old one, but it didn't work. Additionally, I want to move to a newer version of TeXstudio; the .ini file includes in it the version used, so doesn't seem safe to be using it on a different version.


Dhruv suggests a method which almost works. I'm not exactly sure why it doesn't work, but I have a fix. The macros look fine, including having the correct shortcut. However, I had to go onto Configure TeXstudio... --> Shortcuts --> Macros. All the keyboard shortcuts show there. I had to simply double-click on the command under Current Shortcut, then hit Enter. I'd sometimes get a warning saying that the shortcut is already assigned elsewhere. I just hit Enter/Ok.

Best Answer

In the folder where you find the texstudio.ini file there will be a folder called 'macros'. You can copy this folder and paste it into your new installation. I haven't tried it but I think it should do the job.

Cheers.

P.S. If you don't mind sharing the macros that you have made, consider sharing them with the community.

Related Question