User-Defined Language | Code Folding with 'double' keyword



  • Hi,

    is there a way to denote a keyword (for folding) that it should be considered only if it is the first word in a line?

    Unfortunately Microsoft Visual FoxPro uses FOR in two very different meanings:

    1. As a loop
      FOR n = 1 TO 3
      ?n
      ENDFOR

    2. As a condition when replacing table contents:
      REPLACE Table.this WITH “A” FOR Table.that = “B”

    You may imagine that FOR in sample 2 does not start a loop. Notepad++ should not consider it. What can I do?

    Thank you
    A. R.



  • @Andreas-R.

    is there a way to denote a keyword (for folding) that it should be considered only if it is the first word in a li

    afaik, no.
    What comes into my mind would be two ugly hacks.

    1. Assuming Visual FoxPro is case insensitive make it case sensitive and use
      different cases.
    2. Define the FOR loop keyword with an always to use variable
      like “FOR n” as the open folding part.

    Ugly, said it.

    Cheers
    Claudia