Community
    • Login

    How to do variable (and function) highlighting for my own language?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    udl
    2 Posts 2 Posters 2.3k 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.
    • Steven Van IngelgemS
      Steven Van Ingelgem
      last edited by

      In my language, I have variables which are either defined by dim or by prefixing it by @ (implicit variable definition).

      I want to add this syntax highlighting to Notepad++, but I think for the dim, I’m out of luck. But I tried with @, and it’s working, but it’s highlighting the whole line (for example @Var.$id highlights everything, except what I want is everything up to the first .). How could I do this?

      Example:

      @JobListObject = @Node.call("Instantiate", @jblistClass.$id, $self.$id);
      

      I want Notepad++ to highlight all of the following:

      • @JobListObject
      • @Node (without the .call)
      • @jblistClass (without the .$id)
      • $self
      • $id
      • call()

      Is there a way to do this?

      [I know if I switch to Perl language, it looks fine, but I want to define this myself so I can add specific language constructs as well as autocomplete]

      Thanks!

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ
        Jim Dailey
        last edited by

        You could try adding “.” as an operator.

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