Hide Fold Lines
-
@Dave-Bleja said in Hide Fold Lines:
My point is that the change you made has created problems for a “normal” user like me. You asked whether it would affect “normal” users, and I am answering that question for I am, for all intents and purposes, a “normal” user.
If you are “hacking” Notepad++ functionality by using ExtSettings or some NppExec commands or via scripting, you are NOT what I was defining as a “normal user”. Maybe I should have said “typical user”?
It still has not been shown that the change I made to the code affects the typical Notepad++ user.
Note: You said this first:
I guess I’m not a “normal” user, since I too was using ExtSettings to hide those lines.
Correct.
A repetitive electric-green line that cannot be changed no matter the color scheme is, at best, a design flaw.
This is a valid point, although not in the “fold lines” context, since the line when it appears during folding is not green (without some prior “hacking” having been done).
But try this:
- select some range of lines
- press Alt+h (or do View menu > Hide Lines)
- see green line appear across the editing area where lines are hidden (and large green arrows appear in the margin area) --maybe let’s call this line the “lines are hidden here” line
- change to various themes and/or dark mode
- see that the line is ALWAYS green
- go to Style Configurator to attempt to change this line’s color
- fail because there is no way to do such configuration
And, if we change your statement such that it could be talking about the typical “fold line” or the “lines are hidden here” line, like so: A repetitive line that cannot be changed no matter the color scheme is, at best, a design flaw. Then I would agree in that context as well.
Summary:
What’s missing is a way for the typical user to configure:
- on/off for the fold line that extends across the user’s view area when blocks are folded (and this, if it existed, probably makes your whole issue a non-issue)
- the color of that fold line (obviously only meaningful when that line is configured to be on)
- on/off for the “lines are hidden here” line that extends across the user’s view area when lines are hidden
- the color of that “lines are hidden here” line (obviously only meaningful when that line is configured to be on)
(Of course, if the green line’s color can be changed, the next thing users will want will be for the green margin arrows’ color to be changeable…)
I think this more than covers what you mentioned:
…by enabling that lines to be stylable, if not removable
Reference images:
What typical user sees for the “fold line”:
What typical user sees for the “lines are hidden here” line:
-
@Alan-Kilborn
What I would like you to appreciate is that I was a typical user, and I’d happily become one again if given the chance. Unfortunately, typical users who do not want these distracting folding lines have had only two choices:- Realise that there’s no native way of getting rid of them. Tough luck.
- Google the problem and learn that there’s a simple solution: install the simple plugin ExtSettings and click a checkbox. Problem solved (though by clicking a checkbox they are now, by Alan’s unbending blanket definition, classified as “hackers”).
But the change you introduced in 8.5.1 has changed the choices available. They are now:
- Realise that there’s no native way of getting rid of them. Tough luck.
Google the problem and learn that there’s a simple solution: install the simple plugin ExtSettings and click a checkbox. Problem solved (though by Alan’s unbending blanket definition they are now classified as “hackers”).- Google the problem and learn that there’s a complicated solution: install an intimidating-looking plugin called NppExec; enter a bunch of code you don’t understand into a console; then learn how to make it work not as a manually-entered console command, but as an automated script that runs invisibly at startup. None of this is rocket science, though it’s certainly a more daunting collection of hoops to jump through than the now-defunct simple solution above. But to those who don’t like it, Alan says ‘suck it up - you’re a hacker now’.
Since it now takes more time, effort, and know-how to remove these folding lines, it’s highly likely that there will be more typical users who don’t like these distracting lines but who grudgingly accept them because they don’t feel sufficiently confident to jump through the hoops necessary to remove them. Or who, like me, choose not to upgrade past 8.5.0 for the same reason (I know, I know - I don’t count because I’m a “hacker”)
Since the benefits of your change are so far only hypothetical (as I understand it, though I’m happy to be corrected), while the downsides are quite practical, I ask again: would you be prepared to revert the changes until a solution to the folding line problem is implemented, either by you or someone else (any one of the four missing features you outlined would go a long way to addressing this problem)?
PS - I see now that the folding lines are not green by default, but are the same as the default text (which in your screenshot is black, though in my case is near-white #DEDEDE). I stand corrected, though obviously this remains a glaring design flaw either way. Default text needs to be a high-contrast color that draws attention to itself, jumping out of the background for noticeability and legibility. Whereas the job of a folding line is not to draw the eye to itself (since it itself contains no content of inherent value; every such line is identical - no individual line needs to be ‘read’), but rather to the content it demarcates, so a more subtle color for this line would be the more natural design choice. So using the same color for two elements with such contrary purposes isn’t a great idea.
-
Since the benefits of your change are so far only hypothetical…
Not to me, as I take advantage of the freed-up marker (again, in a “hacking N++ context”). And apparently not to the author of Notepad++, who agreed with and accepted my change (on the basis, I’m sure, of offloading functionality from Notepad++ to Scintilla).
would you be prepared to revert the changes until a solution to the folding line problem is implemented
I have no interested in doing so.
As Notepad++ accepts user contributed changes, you could attempt to do so.
But probably by far the better path would be to expend effort to implement some/all of the suggested new settings I proposed in my previous posting.
I suppose an alternative approach you could take is to plead your case to @dinkumoil to change his ExtSettings plugin such that the very simple approach of ticking a checkbox again achieves your goal. If the plugin didn’t exist to provide the checkbox, users would just “grudgingly accept” the fold indication lines, and there’d be nothing to talk about here.
… a glaring design flaw either way. Default text needs to be a high-contrast color that draws attention to itself, jumping out of the background for noticeability and legibility. Whereas the job of a folding line is not to draw the eye to itself (since it itself contains no content of inherent value; every such line is identical - no individual line needs to be ‘read’), but rather to the content it demarcates, so a more subtle color for this line would be the more natural design choice. So using the same color for two elements with such contrary purposes isn’t a great idea.
Well-stated.
-
I am getting black lines in n++ 853 portable and I think that as a feature not as an issue: in fact I like the rows because they separate folded sections of the same file allowing to spot them easily as if they where margins or just separators.
Look at the following screenshots for example: for me it is a very good thing.
But maybe an option to disable them if some users don’t want them maybe would be also appreciated as the possibility to style them with custom colors and lines type. But I love them, in principle. -
@Alan-Kilborn said in Hide Fold Lines:
If the plugin didn’t exist to provide the checkbox, users would just “grudgingly accept” the fold indication lines, and there’d be nothing to talk about here.
Not necessarily … there are other editors out there that are able to hide those same annoying lines.
@Dave-Bleja and whoever might benefit:
Luckily, it’s not hard to finish up dinkumoil’s hack above with NppExec. I have just found and followed
https://community.notepad-plus-plus.org/topic/16484/how-can-i-hide-the-horizontal-lines-that-appear-when-i-fold-a-block/12?_=1690089965676,
with the obvious replacement of the specific commands to run.
For 1st step, the option in that “(menu) Plugins -> NppExec” is called “Execute NppExec Script … (F6)”. Then in “Advanced options” of that NppExec plugin there is indeed a place where you can select the created script to run at startup. -
@Alan-Kilborn said in Hide Fold Lines:
Summary:
What’s missing is a way for the typical user to configure:on/off for the fold line that extends across the user’s view area when blocks are folded (and this, if it existed, probably makes your whole issue a non-issue)
the color of that fold line (obviously only meaningful when that line is configured to be on)
on/off for the “lines are hidden here” line that extends across the user’s view area when lines are hidden
the color of that “lines are hidden here” line (obviously only meaningful when that line is configured to be on)I totally agree, FWIW, and just want to suggest that as a built-in solution (rather than via pluggins), easier to implement than GUI, a configuration file with a list of parameters to set like:
ShowFoldLine=1; # other value possible : 0
Which will include such extra settings that don’t have (yet or never will) a GUI entry somewhere in Settings.
I’ve seen it work in Geany edior, which in particular does have the option this way to hide those folding lines (and some other things I used). -
@Victorel-Petrovich said in Hide Fold Lines:
just want to suggest that
If you read the FAQ you’ll learn that suggestions don’t go here.
a configuration file with a list of parameters to set like:
ShowFoldLine=1; # other value possible : 0Which will include such extra settings that don’t have (yet or never will) a GUI entry somewhere in Settings.
There is already something a bit like this in Notepad++, with either the presence / absence of a specially named zero-length file (e.g.
doLocalConfig.xml
orenableSelectFgColor.xml
) controlling things, or special tags in a file like config.xml (e.g.regexBackward4PowerUser
tag) that have no UI-controlling component and must be hand-edited if used.I’ve seen it work in Geany edior, which in particular does have the option this way to hide those folding lines (and some other things I used).
I think the Scintilla demo editor, SciTE, controls things in a similar manner.
-
@Alan-Kilborn said in Hide Fold Lines:
If you read the FAQ you’ll learn that suggestions don’t go here.
Sure, but it was an informal one… and you broke that “rule” yourself when writing that list of suggestions.
the presence / absence of a specially named zero-length file (e.g. doLocalConfig.xml or enableSelectFgColor.xml ) controlling things, or special tags in a file like config.xml (e.g. regexBackward4PowerUser tag) that have no UI-controlling component and must be hand-edited if used.
The latter would be better than the former (imagine dozens of files in that folder for such little style settings ! ).
Yep, SciTE and textadept and SublimeText and many other editors.
-
@Victorel-Petrovich said in Hide Fold Lines:
@Alan-Kilborn said in Hide Fold Lines:
If you read the FAQ you’ll learn that suggestions don’t go here.
Sure, but it was an informal one… and you broke that “rule” yourself when writing that list of suggestions.
I wish people would understand that when Alan or myself or any of the other regulars point someone to that FAQ, it isn’t supposed to mean “discussion done”. It means that we are trying to inform them or remind them that no matter how much we discuss a potential new feature in the Community, it will not be considered for implementation until a feature is raised in the issue tracker. I guess I need to rework the introduction to that FAQ to make that more obvious.
the presence / absence of a specially named zero-length file (e.g. doLocalConfig.xml or enableSelectFgColor.xml ) controlling things, or special tags in a file like config.xml (e.g. regexBackward4PowerUser tag) that have no UI-controlling component and must be hand-edited if used.
Yep, SciTE and textadept and SublimeText and many other editors.
And Notepad++.
The latter would be better than the former (imagine dozens of files in that folder for such little style settings ! ).
both are used in Notepad++ currently: the ones that Alan mentioned for file-based triggers, and “hidden”
config.xml
preferences for advanced users like the ones for backward regex searches, find/replace history length, and the commandLineInterpreter setting which allows pickingcmd.exe
vspowershell.exe
vs<insert favorite alternate CLI for Windows here>
(
doLocalConfig.xml
cannot be done via theconfig.xml
file, because the result of the logic it triggers determines where Notepad++ searches forconfig.xml
, which would be a rather catch-22 situation. But I don’t see any reason whyenableSelectFgColor.xml
andnppLogNulContentCorruptionIssue.xml
andv852NoNeedShortcutsBackup.xml
and evenasNotepad.xml
couldn’t have been implemented as hidden settings all inconfig.xml
.) -
@PeterJones said in Hide Fold Lines:
I guess I need to rework the introduction to that FAQ to make that more obvious
It now says,
Being directed to this FAQ does not mean “end of discussion”. It is solely to inform you of these facts for the first time, or to remind you of them if you’ve previously seen them. You are allowed and even encouraged to discuss new features ideas or potential bugs found in the Community, as long as you understand that a discussion in this Community Forum is not the same as making an official Feature Request or Bug Report. -
@PeterJones said in Hide Fold Lines:
I wish people would understand that when Alan or myself or any of the other regulars point someone to that FAQ, it isn’t supposed to mean “discussion done”. It means that we are trying to inform them or remind them that no matter how much we discuss a potential new feature in the Community, it will not be considered for implementation until a feature is raised in the issue tracker.
OK Peter, but to me he sounded rather blunt / rejecting, saying suggestions don’t go here. He could have said " hey, as said in FAQ, don’t hope for things to get done just by suggesting here" , or something like that.
So, he got what he asked for, so to speak. Not that I’m upset, and hope he understood too and move on.In fact, if you think about it, what I suggested there could not really be made into an issue on github, because it was only a sort of tip that is only relevant in case he (or other developer) was going to implement any of HIS suggestions in that list about lines.
So, yeah, it was a “suggestion” (in the general sense of the word) but not an independent feature request. More like a comment one the way he (or others) could implement those features… After submitting a proper issue on github. Not here. ;) :)
-
@dinkumoil said in Hide Fold Lines:
Why do we need a folding line and a hidden line, seemingly drawn onto each other? If we would have the hidden line only it would be clear, but this way …
Of course they should not be drawn onto each other.
But, as a user, I can see why it’s good to have them both: sometimes you want to hide the fold lines, and not the non-fold lines.For example, if the code is deeply nested and indented, and you fold some of the fold-points, then the long fold-lines distract from the hierarchical structure. ( I like the alternative markers you show in your picture above )
But not so with some arbitrary fragment of the file that you choose to hide - there the line marker is rather welcome, IMO.
-
Hi, I made a “FoldingLineHider” Plugin.
Now you can use it on recent notepad++ versions.( Not important details: )
As you guys mentioned above, FoldingLineHider used SETFOLDFLAG before v8.5, and after v8.5.1 the green line problem has appeared. So I fixed it to set transparency of the folding line, and now it works well again.I didn’t know the history of this behavior and didn’t read this thread. :) And now i understand what happened. :)
Anyway now i read this thread, so i mention my plugin FoldingLineHider. Please try it if you still need this feature.
-
@leonardchai said in Hide Fold Lines:
I made a “FoldingLineHider” Plugin.
Hmm, so WHERE does one find this plugin?
-
To “hide” the folding lines, one can change the “Foreground colour” of the “Default Style”.
- Go to “Settings” -> “Style Configurator…”
- Select “Global Styles” in “Language” list
- Select “Default Style” in “Style”
- Click on the “Foreground colour” at the right side of the pane ( inside “Colour Style” area )
- Select white color
- Click on “Save & Close”
-
@Ivan ,
In what way do you think this answers the original request (from more than a year ago)? Because you are just setting the default color to be white-on-white – that has nothing to do with the “fold lines” that this discussion is about, and would just make some random text in some languages, and all text in a
.txt
file, not visible. But that has nothing to do with the little green lines under the folded section of code that was originally asked about. -
This post is deleted! -
@Alan-Kilborn here is the plugin: (i cannot post links yet)
github.com/leonardchai/FoldingLineHider/tree/master
Just tested on v8.7 and it works as intended.
—
moderator linkified URL