• Login
Community
  • Login

Implied folding close

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 740 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.
  • J
    Jeff Bowles
    last edited by Jun 7, 2022, 2:46 PM

    I’m working on a UDL for a non-programming language data file, to make it easier to read.

    I’d like to be able to fold (collapse) sections of text based on a definite opening string, and the closing string would need to be implied by the presence of the subsequent opening. In other words, the folding close is not always a predictable string, but the opening is.

    For example, let’s say that a foldable section will always be identified by a line with the word “foo”, but the lines after that are unpredictable, at least until the next “foo” line. So, a “foo” line would imply "close prior section (if any) and start new section. So I’d like the folding to follow the groupings below. I’m willing to accept the possibility that the final group might not be collapsible, because there would not be a final “foo” to imply the group boundary.

    foo
    bar
    bat

    foo
    baz
    qux
    waldo

    foo
    fred
    bar
    thud

    foo
    plugh
    baz
    bat
    bar

    Does the existing UDL facility allow for something like this?

    Thanks!

    Jeff

    P 1 Reply Last reply Jun 7, 2022, 3:14 PM Reply Quote 0
    • P
      PeterJones @Jeff Bowles
      last edited by Jun 7, 2022, 3:14 PM

      @jeff-bowles said in Implied folding close:

      Does the existing UDL facility allow for something like this?

      Nope, sorry. The UDL folding is pretty simplistic in its logic, and cannot do fancy stuff like that.

      J 1 Reply Last reply Jun 7, 2022, 3:18 PM Reply Quote 1
      • J
        Jeff Bowles @PeterJones
        last edited by Jun 7, 2022, 3:18 PM

        @peterjones So would I re-frame my question and put it in as a feature request, or is it very difficult to implement something like this?

        P 1 Reply Last reply Jun 7, 2022, 3:23 PM Reply Quote 0
        • P
          PeterJones @Jeff Bowles
          last edited by PeterJones Jun 7, 2022, 3:40 PM Jun 7, 2022, 3:23 PM

          @jeff-bowles ,

          FYI: We in the Forum cannot change the codebase, and the Forum is not the official feature request location.

          That said, even if you were to create a feature request in the official location (as described in the FAQ), I doubt it would be implemented. The UDL has not had any significant/meaningful changes in years. (The lack of UDL development is my biggest complaint about Notepad++, because there have been critical known issues, like not handling unicode characters, not allowing pattern matches rather than literals in the keywords and folding, and the other limitations in folding: I’m sure these limitations are chasing away many users, who would actually use Notepad++ if those were fixed/implemented. My long-term hope is that someone will take it upon themselves to write “UDL 3.0” as a plugin-lexer, and re-implement it from the ground up with the modern features, but that’s a huge ask, and something that I don’t yet have the skills or bandwidth to do [and aren’t likely to in the next few years])

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