Community
    • Login

    Notepad++ edit existing (C++) syntax

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 626 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.
    • Андрей СчастливыйА Offline
      Андрей Счастливый
      last edited by

      Hi!
      I ask experts to tell me how to edit the existing (C++) syntax in Notepad++ or add to it - so that parameters that start with $ (for example, $PAR1) are highlighted in a separate color?

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @Андрей Счастливый
        last edited by

        @Андрей-Счастливый said in Notepad++ edit existing (C++) syntax:

        parameters that start with $ (for example, $PAR1) are highlighted in a separate color?

        Is this a valid C++ syntax?
        Can you show some examples if you think so?

        You might have luck with the EnhanceAnyLexer plugin, but I don’t think you’ll be able to do what you wish with the Notepad++ processing of C++.

        rdipardoR PeterJonesP 2 Replies Last reply Reply Quote 3
        • rdipardoR Offline
          rdipardo @Alan Kilborn
          last edited by

          @Alan-Kilborn said in Notepad++ edit existing (C++) syntax:

          Is this a valid C++ syntax?

          Lexilla has optional support for it:

          lexer.cpp.allow.dollars Set to 0 to disallow the ‘$’ character in identifiers with the cpp lexer.

          https://www.scintilla.org/SciTEDoc.html

          Since the default is 1, and the editor does not disable it, C/C++ identifiers containing $ should already appear valid to the lexer. The only problem is the lack of special styling. The plugin recommended above would be sufficient for that.

          1 Reply Last reply Reply Quote 3
          • PeterJonesP Online
            PeterJones @Alan Kilborn
            last edited by

            @Alan-Kilborn said in Notepad++ edit existing (C++) syntax:

            Is this a valid C++ syntax?

            it’s a “tolerated” extension to standard C++, as far as i can gather. [1]

            Alan KilbornA 1 Reply Last reply Reply Quote 1
            • Alan KilbornA Offline
              Alan Kilborn @PeterJones
              last edited by Alan Kilborn

              Yuck to using $ in such a way in C++ – is that really needed? (purely a rhetorical question since this is not the forum for it).

              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