• Login
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.
  • C
    Charlie Fuller
    last edited by Oct 23, 2017, 5:12 PM

    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
    • J
      Jim Dailey
      last edited by Oct 23, 2017, 7:13 PM

      @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
      • C
        Charlie Fuller
        last edited by Oct 23, 2017, 10:43 PM

        bingo…thankyou thankyou thankyou!

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