Folding and user defined language questions
-
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? -
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 -
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 functioncall bla_bla*
I wonder how to apply the same styler to “call” and a word that comes next, while not affecting words like “recalled”…