Community
    • Login

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

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    foxprocode foldinguser-defined la
    2 Posts 2 Posters 1.5k 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.
    • Andreas R.A
      Andreas R.
      last edited by

      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.

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        Claudia Frank @Andreas R.
        last edited by

        @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

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