Community
    • Login

    UDL if then multiline / single line

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 2.6k 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.
    • Baksa PéterB Offline
      Baksa Péter
      last edited by

      Is there a way to properly fold multiline if-then-else-endif, and not fold oneline if-then-else (without endif)?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Baksa Péter
        last edited by

        @Baksa-Péter

        there is a way but this means you need to cheat and add additional code (comment) to it.
        Define the normal if (open) else(middle) endif(close)

        everything should work for this example

        if x then
            y
        else
            z
        endif
        

        and add //end as the close in comment folding.
        It’s assumed that // is the comment sign in your language.
        Now this line

        if x then y else z //end
        

        doesn’t get folded. A bit a hack but works.

        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