Community
    • Login

    using "FOR" in language definition causes unexpected results

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    syntax highlightudl
    3 Posts 2 Posters 1.4k 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.
    • Charlie FullerC
      Charlie Fuller
      last edited by

      We use a language definition file for our scripting software in Notepad++
      We have an open/close folding definition that includes FOR and END_FOR (in addition to other standard commands)
      The syntax highlighting highlights FOR, but also highlights the letters “for” and “FOR” in words that contain those strings (not just when they exist alone. So if we use FORCE, FOREIGN, FORMAT, REINFORCMENT, BEFORE or other words used as a variable name (not part of our language definition file), the “FOR” part is still highlighted. Since the text editor thinks you are calling the function FOR it messes up code collapsing and is quite a nuisance. Is there a way to fix this. It doesn’t seem to be an issue for other commands like IF, AND, OR… why for FOR?

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ
        Jim Dailey
        last edited by

        @Charlie-Fuller

        I’m guessing your FOR, END_FOR definitions are in the Folding in code 1 style box. Try moving them to the Folding in code 2 style (separators needed) box.

        1 Reply Last reply Reply Quote 0
        • Charlie FullerC
          Charlie Fuller
          last edited by

          bingo…thankyou thankyou thankyou!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors