[Tex/LaTex] Where to store macros for TeXstudio


I'm switching from Winedt to TeXstudio. I have lots of Winedt macros and I would like to write new ones for TeXstudio.
Now I read about available macro functions, but I still don't understand where I should store the macro file?
If I add macro to that form Macros->Edit Macros, it appears in .INI file (one line like Macros\0=test).
But its hard to edit such a macros.

Question, is it possible/simple to load javascript macros from files?

It would be great to have a Macros directory, where you could store all your macros.

Best Answer

There is no official way to import macros. All creation and editing should be done via the dialog. As a workaround for importing many macros, you could write a script, that adds the corresponding entries to the .ini.

The format is Macros\<number>=<name>, <tag>, <abbreviation>, <trigger>.

The <number> should be consecutive. Each of <name>, <tag>, <abbreviation>, <trigger> are strings (only require quotes if they contain a colon themselves).

However, we don't guarantee that the format will not change in later versions.

Note: I don't know the macros of Winedt, but macros used there won't work in TXS because TXS has its own API for the editor.