Community
    • Login

    Notepad++ edit existing (C++) syntax

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 4 Posters 334 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.
    • Андрей СчастливыйА
      Андрей Счастливый
      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
        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
          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
            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
              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
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors