• Login
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.
  • A
    Alex Woolf
    last edited by Mar 14, 2017, 2:15 PM

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

    C 1 Reply Last reply Mar 14, 2017, 9:43 PM Reply Quote 0
    • C
      Claudia Frank @Alex Woolf
      last edited by Mar 14, 2017, 9:43 PM

      @Alex-Woolf

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

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • A
        Alex Woolf
        last edited by Alex Woolf Mar 15, 2017, 10:19 AM Mar 15, 2017, 10:17 AM

        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.

        C 1 Reply Last reply Mar 15, 2017, 12:28 PM Reply Quote 0
        • C
          Claudia Frank @Alex Woolf
          last edited by Mar 15, 2017, 12:28 PM

          @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
          • A
            Alex Woolf
            last edited by Mar 15, 2017, 8:02 PM

            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
            • P
              PeterJones
              last edited by Mar 16, 2017, 1:07 PM

              @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
              3 out of 6
              • First post
                3/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors