Community
    • Login

    Batch adding macros and syntax highlighting

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 3 Posters 3.4k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Alex WoolfA
      Alex Woolf
      last edited by

      Hello!
      How can I automatically add my macros and my syntax highlighting to the Notepad++?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Alex Woolf
        last edited by

        @Alex-Woolf

        Macros are stored in shortcuts.xml and udls in userDefineLang.xml.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Alex WoolfA
          Alex Woolf
          last edited by Alex Woolf

          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.

          Claudia FrankC 1 Reply Last reply Reply Quote 0
          • Claudia FrankC
            Claudia Frank @Alex Woolf
            last edited by

            @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

            1 Reply Last reply Reply Quote 0
            • Alex WoolfA
              Alex Woolf
              last edited by

              Ok.
              Adding macro - ONLY by copying shortcuts.xml file. It’s not good, but this way is allowable.
              And what about syntax highlighting?

              1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones
                last edited by

                @Alex-Woolf,

                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:

                1. Original PC: Language > Define Your Language
                2. Use the pulldown to select the User Language: ____ you want to transfer, and click the Export... button
                3. Copy that file on the new PC
                4. New PC: Language > Define Your Language: click the Import... button, and select that file
                5. 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 notepad++.exe.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors