Community
    • Login

    I have some problems making my own Language.

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 3 Posters 905 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.
    • Julian KrusteJ
      Julian Kruste
      last edited by

      I’m trying to order my text file with games that I played/ want to play,…
      And I always marked them with stuff like “finished” or “_meh” and slowly but surely the file was getting more and more cluttered, so I decided to give every one of those keywords a different style, but when I tried exactly this, it didn’t really work, a grey bar appears at the left hand side of the text, but besides that nothing happens.
      80e38594-529d-4c89-8f6a-3e59693911fd-image.png
      My settings in User Defined Language
      64eea7db-c1c4-4a8f-98d8-076d208f1ac7-image.png
      An example of how the lines of text (different games) look.

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

        In your example, _playing_next_ is not highlighted because the word that the parser sees is Warface_playing_next_, which is not the same (it’s looking for whole words):
        fe130c56-c40c-42ab-9ab1-0b310cb5f7f5-image.png

        Unfortunately, the UDL system allows for Prefix Mode, but doesn’t have a suffix mode.
        d4937c96-e224-48b4-9eb2-47a71c1b1d42-image.png

        So, in your example, if you set the prefix mode on, then you could use the text
        _playing_next_Warface instead of Warface_playing_next_, and it would highlight the whole word. Either that, or put a space between the game name and the _playing_next_ tag, like Warface _playing_next_.

        27125ca7-7bf1-42dd-9cc1-3c4d39489c73-image.png

        addendum: you can also add extra highlighting to a UDL language using regexes via the script EnhanceUDLLexer.py that @Ekopalypse shares in this linked post

        1 Reply Last reply Reply Quote 3
        • EkopalypseE
          Ekopalypse
          last edited by

          Not sure you can do this but what I normally do in such a case is
          using Delimiters with different open but same close tags
          and one unique folder setting.
          Something like this for example

          6991876e-76a0-4151-ab08-49528ce7831c-image.png

          c0613137-4dd1-4911-8cbc-d811353fc66f-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