Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Colour code nested brackets

    Help wanted · · · – – – · · ·
    3
    4
    3536
    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.
    • BENielsen
      BENielsen last edited by

      Could someone help me find or create something that will make notepad++ colour code nested brackets?

      Example: [green [blue [red] blue] green [blue [red [purple] red] blue] green]

      Scott Sumner 1 Reply Last reply Reply Quote 1
      • Scott Sumner
        Scott Sumner @BENielsen last edited by

        @BENielsen

        Not exactly what you’re looking for, but maybe what is suggested here could meet your need?

        Note: You didn’t state the reason for your desire, you simply stated your desire. If you provide your reasoning, you give the responders here more to work with (when providing similar alternatives that might work for you).

        1 Reply Last reply Reply Quote 0
        • BENielsen
          BENielsen last edited by

          I’m working on a couple of macro programs for a cnc, and the logic can get a little tough to follow at a glance. Having colour coding would simplify things a lot for me, especially when it gets heavier than this (up to 27 levels of nesting).

          Here’s an example of the code:
          IF [#181GT#[45000+#[900+#900]]] GOTO99

          I’m also working with nested loop statements that run from the line ending in DO1 to END1(DO2 to END2 and so on)
          in this case coding the loops so that each level of nesting has its own colour would be helpful.

          Here’s an example of that:
          #152=1
          WHILE[#152LE40]DO1
          WHILE[#[45000+#152]EQ0]DO2
          #[45000+#152]=1
          #[500+#152]=#[500+#152]+1
          END2
          #152=#152+1
          END1
          (RESET USED VARIABLES)
          #152=#0

          Claudia Frank 1 Reply Last reply Reply Quote 0
          • Claudia Frank
            Claudia Frank @BENielsen last edited by Claudia Frank

            @BENielsen

            not sure if this helpful but up to 8 levels can be done with UDL (Language->define your language).
            You just need to make sure that you allow nesting for all delimiters
            and of course use different color.

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright © 2014 NodeBB Forums | Contributors