Batch adding macros and syntax highlighting
-
Hello!
How can I automatically add my macros and my syntax highlighting to the Notepad++? -
-
I know it. But I don’t know, how can I add new macros automatically.
What about syntax highlighting?
Where can I write it?
And how can I add new syntax highlighting automatically. -
@Alex-Woolf
sorry, but I don’t understand your question.
When creating a macro it is automatically saved in shortcuts.xml.
You want to have these macros on another PC? Copy the file to that machine.
Same applies to UDL.Cheers
Claudia -
Ok.
Adding macro - ONLY by copying shortcuts.xml file. It’s not good, but this way is allowable.
And what about syntax highlighting? -
As @Claudia-Frank said, “Same applies to UDL”, and she said earlier that the custom syntax highlighting settings, which are known UDLs (User Defined Languages:
Language > Define Your Language
) are stored in userDefineLang.xml. You could either copy that single file to the new PC, or you could use the UDL window’s interface:- Original PC:
Language > Define Your Language
- Use the pulldown to select the
User Language: ____
you want to transfer, and click theExport...
button - Copy that file on the new PC
- New PC:
Language > Define Your Language
: click theImport...
button, and select that file - Repeat for every UDL (syntax highlighting definition) that you want to transfer.
If you’ve got more than one, it’s probably simplest to just copy the whole file, but if you only have one, or you don’t want to duplicate them all, you can do it using the UDL window.
BTW: Since it wasn’t mentioned, those files are by default in
%AppData%\Notepad++\
, though if you’ve got a portable version of NPP, or if you chose to not use%AppData%
when installing, they will be in the same folder as yournotepad++.exe
. - Original PC: