Batch adding macros and syntax highlighting
How can I automatically add my macros and my syntax highlighting to the Notepad++?
Macros are stored in shortcuts.xml and udls in userDefineLang.xml.
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.
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.
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 the
- Copy that file on the new PC
- New PC:
Language > Define Your Language: click the
Import...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 your
- Original PC: