Community
    • Login

    Built in Language to UDL?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 995 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.
    • chris aldridgeC
      chris aldridge
      last edited by

      Hi,
      sry if i’m in the wrong place, i’m just an old (PL/SQL etc) coder and its actually my first ever post on this new web thingy. :)>

      I wish there was a way to select say, the C language, and then export it to a UDL.xml file that I could then easily edit to add the missing keywords. I’m trying to do some GLSL coding , I read the UDL docs and then imported an existing GLSL UDL (which didn’t fold anything but contained some GLSL keywords). Then I made a load of my useless UDL’s, than can fold comments or functions but not both! It was driving me mad but luckily simply selecting “C” does what my UDLs cannot do . l saw a previous post by David Lin on 5 Feb 2021, 18:53 but his requirements seemed way more advanced than mine.

      I’m naturally pessimistic but I guess its worth asking, so

      Many Thanks for taking the time to read this…
      Chris

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

        @chris-aldridge ,

        No, you cannot convert a built-in language to a UDL.

        If you want to automatically use c-style syntax highlighting and folding for your GLSL files, you can.

        • In the Settings > Style Configurator , select the C language.
        • In User ext.: box, type the name of the extension without the dot (glsl or whatever)
        • In the INSTRUCTION WORD and/or TYPE WORD styles, use the User-defined keywords to add user-defined keywords (ie, your GLSL-specific words)

        ac49505e-e19a-4e54-b01a-c5235cae21af-image.png

        1 Reply Last reply Reply Quote 3
        • chris aldridgeC
          chris aldridge
          last edited by

          Wow,
          many thanks @PeterJones that was so quick and your solution is perfect. I’ve done what you suggested and its working perfectly now.

          FYI The only minor problem remaining is that “#define #include #ifdef #ifndef #elif #endif #pragma” aren’t highlighted as Instruction words and similarly "SV_DispatchThreadID iChannelTime[0] iChannelTime[1] iChannelTime[2] iChannelTime[3] iChannelResolution[0] iChannelResolution[1] iChannelResolution[2] iChannelResolution[3] " aren’t highlighted as Type words.

          But I don’t care as this is me 99.9% happy (at least until until I want to try and learn C).
          Thanks again for keeping this great free product alive,
          Chris

          EkopalypseE 1 Reply Last reply Reply Quote 0
          • EkopalypseE
            Ekopalypse @chris aldridge
            last edited by

            @chris-aldridge

            #define … are handled by the preprocessor list and SV_DispatchThreadID … do get colored once I add it to the type word list

            078fecae-0c1f-43d6-83f3-3fd36c317682-image.png

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