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.6k Views 2 Watching
    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 Offline
      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 Offline
        Jim Dailey
        last edited by

        You could try adding “.” as an operator.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors