Community
    • Login

    Folding and user defined language questions

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 3.1k 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.
    • Marcin GruszczyńskiM Offline
      Marcin Gruszczyński
      last edited by

      I’m customizing user defined language to work with KSP (Kontakt script) and I’ve got some questions I can’t figure out, maybe someone could help me out.

      Is there a line limit for folding?
      Folding is very useful. I defined the conditions and it’s working on shorter scripts, but it seems to go south completely, when a section to fold is relatively large, like 5000+ lines. It seems to pick folding point randomly all over the place. I wonder if it’s problem with too large section to fold or it may be something else.

      Is there a way to remember folding state?
      Say I have a file open, I fold all. Close Notepad++, re-open and it’s all unfold again. However if I have the same file open in two panes, it will open with folded sections, just as it was when I closed the program. Is there a way to control it?

      Is it possible to copy/paste or drag’n’drop whole folded section?
      It would be very useful to move whole folded sections around, is there option to do it?

      Claudia FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC Offline
        Claudia Frank @Marcin Gruszczyński
        last edited by Claudia Frank

        @Marcin-Gruszczyński

        Is there a line limit for folding?

        A simple test with 10000 lines didn’t show any issues but this doesn’t
        mean that a more complex test with different foldings in between wouldn’t.
        If you could share the file and udl xml we could check if this is the case.

        Is there a way to remember folding state?

        Normally this is the case if you have remember current session … enabled (Settings->Preferences->Backup)

        Is it possible to copy/paste or drag’n’drop whole folded section?

        Select the folded section but make sure that your cursor ends on the next line -> ctrl+c / ctrl+v

        t would be very useful to move whole folded sections around, is there option to do it?

        The same as before ctrl+shift arrow up or down - but it will open the folded section after action.
        Maybe using collapse level functions to fold again.

        Cheers
        Claudia

        Marcin GruszczyńskiM 1 Reply Last reply Reply Quote 0
        • Marcin GruszczyńskiM Offline
          Marcin Gruszczyński @Claudia Frank
          last edited by

          A simple test with 10000 lines didn’t show any issues but this doesn’t
          mean that a more complex test with different foldings in between wouldn’t.
          If you could share the file and udl xml we could check if this is the case.

          I wouldn’t want to post the code in question on public forum. But, as I was trying to re-create the problem, I figured, it has something to do with encoding. The original file was marked as UTF-8, performing “convert to ANSI” fixes the problem, moreover when I convert it back to UTF-8 it still works. So, I guess there was something wrong in the file. Thank you for pointing me in the right direction.

          Is there a way to remember folding state?

          Normally this is the case if you have remember current session … enabled (Settings->Preferences->Backup)

          Yes, I have the setting enabled. I’m working with two views open and it seems that the program always unfolds everything on left view, while remembering the state of right view.

          Also, I wonder, if it’s possible to you a phrase containing a whitespace, as a prefix if keyword list. I have this structure:
          *function bla_bla
          …
          end function

          call bla_bla*

          I wonder how to apply the same styler to “call” and a word that comes next, while not affecting words like “recalled”…

          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