Community
    • Login

    Using \\ as the start to a comment line

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 536 Views 1 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.
    • Tom BrownT Offline
      Tom Brown
      last edited by

      How do I add a style to the sql language (or any language) to recognize \ as the beginning of a comment and highlight it as such? I’m copy code from my Jitterbit scripts which is based on Salesforce SQL.

      Thanks

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

        Expanding a builtin language for anything other than a keyword is not something you can do without access to the source code.

        You could use a User Defined Language, but you’d probably feel it didn’t meet all your needs. If that was enough, a UDL will allow \\ to mark a comment line, like so:
        f71846ac-63a9-4a88-b670-384ca07fe399-image.png

        However, you can add extra highlighting to a builtin lexer (like the SQL lexer) using regexes via the script EnhanceAnyBuiltinLexer.py that @Ekopalypse shares in this linked post

        1 Reply Last reply Reply Quote 1

        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