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.8k Views 2 Watching
    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 Offline
      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 Offline
        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

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors