• Login
Community
  • Login

UDL folding breaks halfway through the file

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
2 Posts 2 Posters 275 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.
  • A
    ArminRay
    last edited by Oct 27, 2023, 1:33 PM

    Sorry for bad formatting, currently on mobile.

    Just to note, the file I’m working on isn’t just code, it’s a bit of an all in one tutorial file which has code, comments, etc.

    I set up a UDL which had a couple of symbols used to fold big chunks of stuff I don’t always need to see. (Ex. #<, #! to start the fold and #>, #$ to end the fold)

    It works fine for about the first third of the file, but then breaks halfway through the file. It also breaks every time I fold and unfold it as well.

    Pictures attached:
    Initial setup: also tried the symbols I mentioned in the post.
    image001.png
    Works fine initially:
    image002.png
    Breaks eventually:
    image003.png

    P 1 Reply Last reply Oct 27, 2023, 2:04 PM Reply Quote 0
    • P
      PeterJones @ArminRay
      last edited by PeterJones Oct 27, 2023, 2:10 PM Oct 27, 2023, 2:04 PM

      @ArminRay said in UDL folding breaks halfway through the file:

      It works fine for about the first third of the file, but then breaks halfway through the file.

      Unfortunately, the UDL folding has never been perfect, and it’s been pointed out to the developer for years: nothing has ever come of such reports (or any of the other feature requests for UDL). We essentially have to live with imperfect folding for UDL, or not use it. (Some of my UDL don’t fold right even near the top of the document, if the first line(s) of the document are a comment. So it might be that a comment somewhere in your file is the culprit for breaking folding. And consider yourself “lucky” that it works for even the first 1/3 of the file.)

      If you write a Lexer Plugin , you can define the folding yourself, and it might work better for you than UDL’s built-in folding. But that’s a lot of work, and I doubt you’ll go that far.

      (Sorry, there’s not much else I can say. It’s annoying that a much-used feature of Notepad++ has essentially been left to rot, letting people use what works, but ignoring what doesn’t or what could be made better. The best I can do is commiserate with you, because I cannot offer you any hope that the UDL system will ever get better.)

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