Problem seeing some line numbers when Folding plain text
-
@Frank-Wojtczak ,
You don’t see them, because they are folded. You won’t see numbers for those sections, unless the amount of lines is negligible. If you have sections, inside of sections (we usully use Classes, with functions inside), there are a lot of text that depending on which one you unfold will show the numbers where that text is, but not the rest of the folded text because it doesn’t know the line number applicable, unless they are unfolded…it’s variable dependent on the number of unfolded parts. -
@Lycan-Thrope But you are ignoring all the lines that have [ and ] at either end. Those lines are NOT folded, and yet you don’t see their line numbers either. I purposely put those lines NOT in the folded area. Why are their line numbers missing?
Also, please note that you CAN see the line numbers for the [STUFF TO BE SORTED], the [CREDENTIALS], and the [end-of-file] lines. Why are they visible?
-
@Frank-Wojtczak ,
Did you put two cr/lf at the end of the file, for starters? There is a well known bug that if you don’t have that at the end of the file, the folding doesn’t work properly for the whole file. Have run into it myself with UDL’s.Additionally, I don’t have or know your UDL, so I don’t have any idea what else could be wrong in the UDL YOU have designed.
-
@Lycan-Thrope Each time I use the {{ or }} (start and end section), I put a CR-LF at the end of of those each line with nothing else on those lines.
My UDL is simply the {{ for the Start and the }} for the end. I have modified nothing else in the UDL (except to change the default style to match my dark mode: white text color on black background color).
That’s it. I haven’t modified the UDL any further then that.
One more thought occurred to me. When you said:
Did you put two cr/lf at the end of the file, for starters?
You were referring to the very end of the file, correct? After all the multiple lines at the end that are NOT part of a FOLD area, I currently have the last part of the last line of text is:
~~~~~~~~~~~~~~~~ CR LF
CR LFIs this what you are asking if I have done?
(Note: I don’t know why the line I quoted of yours defaults to hidden)
-
@Frank-Wojtczak said in Problem seeing some line numbers when Folding plain text:
You were referring to the very end of the file, correct? After all the multiple lines at the end that are NOT part of a FOLD area, I currently have the last part of the last line of text is:
CR LF Is this what you are asking if I have done?
I have to correct myself, as this issue of an empty line with a CR is related to the Function List functionality, not the UDL. However, on that note, I know the UDL can be a bit buggy depending on the way things are setup in the UDL definition, which is what I meant about not knowing the UDL you created. Sorry about that.
(Note: I don’t know why the line I quoted of yours defaults to hidden)
Me either. I’m just a user like you, who’s been here a little longer, but I’m not an expert at any of this Forum’s capabilities, nor of the more esoteric behaviors of it or Notepad++'s either as I’m still learning also.
By the way Frank, if you want more help, you need to provide more info and resources. For instance, the text you’re using to show how the UDL isn’t working, is in a screenshot. It’s not in the
</>
pair which is the forum’s way of showing the text so people can pull it from your message and use to figure out why it’s not working. You only need to include enough to allow someone to see how the UDL works, because I believe the forum limits the amount of text you can have…but either way, a better description of the UDL so people can try to recreate it to see the problem would be needed also, and just saying that you use{{
and}}
pairs won’t help if they don’t have the text you are using to test with. -
@Frank-Wojtczak said in Problem seeing some line numbers when Folding plain text:
I had to manually go in and put Style information for the Normal text because I use Dark mode and that was the only way I saw to fix it and not have reversed text (and numbers, too). Strangely, even though I did get a nice response from a helpful user (PeterJones) suggesting I make my character color Transparent.
For those who were curious, that was Code Folding Plan Text in Dark Mode from last year.
You can set the Default Style to “transparent” (I now prefer to think of it as “inherit”) for both Foreground and Background and have it work right in Dark Mode:
Folder & Default > Default Style > Styler Folder & Default > Folding In Code 1 style > Styler Folder & Default > Folding in Code 1 style > Open/Close Comment & Number > Number Style > Styler Setting both colors to “Transparent” is the right way of making it inherit from the current theme, and it does work.
It simply made my text black on black (invisible)
Presumably, that means you only told it to set the background color to Transparent, rather than telling it to make both colors Transparent, because that would keep the default foreground color of black, and inherit the dark background from your dark theme.
(Note: I don’t know why the line I quoted of yours defaults to hidden)
Normally, when you quote something, there is a single
>
in front of it. In your post, there were two:> >
. That sometimes accidentally happens if you copy something from a quote, and then paste it immediately after the quote: the Forum “helpfully” adds a second level of indentation. When there is a second level of indentation (two> >
), then the Forum hides it, to avoid cluttering a conversation with deep quotes. So if you ever see a “quote section” with two or more>
at the start of the line, just know the forum will hide it; delete it until it’s only one>
if you don’t want it hidden.Finally:
Regarding your actual problem – the Notepad++ line numbers are missing – that’s one I’ve never seen. I need to get going right now, but if I have time later, I’ll see if I can replicate. (Unfortunately, either way, it’s likely nothing will happen. The developer tends to ignore any issue about the UDL system.)
-
@PeterJones said in Problem seeing some line numbers when Folding plain text:
if I have time later, I’ll see if I can replicate
Unfortunately, I cannot replicate it:
(the contents of each folded section are just empty lines in my case)That doesn’t mean it’s not a real problem for you. Unfortunately, some of the bugs in the UDL are really weird, and aren’t consistent. Often, if there’s a comment as the first line (or group of lines), it can cause folding sections later to not line up with the actual folding indicators.
It might also be one or more of your plugins interfering. You might try running with the
-noPlugin
command-line option, and if that fixes the problem, then see if you can narrow down the culprit plugin(s) using the Possible Culprit: Plugin section of this FAQ -
@Frank-Wojtczak, Do you see the same issue with the line numbers if you create a simple
test.htm
file with something such as:line 1 <x> Line 3 </x> <x> Line 6 </x> <x> Line 9 </x> line 11
When I fold all three blocks I see:
The goal with this test is to see if the issue is with your Notepad++ style settings or something more specific to the UDL you created for
{{ }}
folding. Often times when people update Notepad++ they don’t realize the installer retains all of the old style settings, and won’t overwrite them. At times people end up with style settings that are out of sync with what newer Notepad++ editions of the editor were tested with. -
With regard to the original problem, it might be an insurmountable challenge to show you my (2000+) text file because, among other things, there is some private info in there that I can’t allow others to see. And, having to go thru 2000+ lines and “sanitizing” all those lines is way too much to go through to resolve this.
However, what I did do is use the Search/Replace feature and removed all letters, numbers, and punctuation (except for Curly brackets) from the entirety of the file between the start of the first FOLD area and ending of the last FOLD area. The only thing left (aside from the FOLD areas) are:
A) Each of the areas to be folded have the “Description” line just before the next line with just the “OPEN” double-curly brackets
B) Any other single curly brackets that were wherever they were in the file as part of the previous text. (there were no other double-curly brackets used anywhere else in the file)
Upon ending up with a relatively short and almost empty file with a few dozen single curly brackets scattered through the document, I can now fold and unfold, all the line numbers stay visible at all times.
At this point, I can only try to (slowly) work my way through the entire file, one folded section at a time, and see if I can find out what line(s) are causing the problem.
In short, I’m guessing that, even though there are no other “double open” {{ or “double close” }} curly brackets anywhere in the file, my assumption is that (somehow) a single curly bracket is causing the problem, or something that’s NOT a curly bracket is causing the problem. But I’ll need to scour through the document to find out whats wrong.
By the way, @PeterJones, I found out the reason I was getting black on black text was because I didn’t notice that there were TWO of the Transparent boxes to check and I had only checked just the right-hand box. Now the Transparent trick works just fine.
As for the problem with the quote being hidden, that was simply my lack of knowledge of using the Forum software. Back in the day (maybe it’s still available?) I used to get by with BBCode, but it’d been a while and I messed up/forgot what codes did what. I ended up just using the “chevron” character (Shift-comma or Shift-period) on an English keyboard and that was obviously my problem, so just ignore that.
-
@Frank-Wojtczak said in Problem seeing some line numbers when Folding plain text:
Upon ending up with a relatively short and almost empty file with a few dozen single curly brackets scattered through the document, I can now fold and unfold, all the line numbers stay visible at all times.
At this point, I can only try to (slowly) work my way through the entire file, one folded section at a time, and see if I can find out what line(s) are causing the problem.
In short, I’m guessing that, even though there are no other “double open” {{ or “double close” }} curly brackets anywhere in the file, my assumption is that (somehow) a single curly bracket is causing the problem, or something that’s NOT a curly bracket is causing the problem. But I’ll need to scour through the document to find out whats wrong.
That’s exactly what I was trying to relay to you. Don’t feel bad or alone. Thanks to the help from the folks here, I was able to get as complete a package as possible using the UDL, FunctionList and Autocomplete capabilities to emulate my development language’s IDE…but it took me the better part of a year.
Take the sections one by one until you find the offending issue. It’s painstaking, but it’s about the only way to fix it with the tools we have available, being the UDL…when the other option is writing a full on lexer.
Welcome to Notepad++ UDL creation. :-)
-
@Lycan-Thrope said in [Problem seeing some line numbers when
Take the sections one by one until you find the offending issue. It’s painstaking, but it’s about the only way to fix it with the tools we have available, being the UDL…when the other option is writing a full on lexer.
Welcome to Notepad++ UDL creation. :-)
I appreciate all the help that you, and all the other respondents have provided here. As much as I wish it was a simple solution, sometimes it’s not and you just have to slog through a problem to get a resolution. Either way, it’s good to have a place to be able to ask questions and get good help in return.
Thanks to all of you for the good information! (and quick replies!)