Community
    • Login

    UDL if then multiline / single line

    Scheduled Pinned Locked Moved General Discussion
    2 Posts 2 Posters 2.2k 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.
    • Baksa PéterB
      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
        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
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors