You are here: PSPad forum > English discussion forum > Settings for highlighting all occurrences of selected text
Posted by: Professor Bernd | Date: 2020-05-21 18:13 | IP: IP Logged
Hello.
Thanks for this really important feature, it's a great help!
Could you please add 2 settings to the feature?
- Minimum length from which is highlighted.
This is good, so that it is not already highlighted when you select 1 letter. It doesn't flicker so much if the highlighting starts only after you have selected at least 3 letters.
- Different colors for highlighting occurrences than for the selected text.
On the one hand this is important to make the feature "quieter" by giving the highlighting a subtle color, on the other hand it makes it easier to see which is the selected text. For example, if you have scrolled a little, you will know better which is the text you are currently editing.
I have created two photomontages as suggestions.
This could also be useful:
- No highlighting if only spaces/tabs are selected.
Bernd.
Edited 1 time(s). Last edit at 2020-05-21 18:16 by Professor Bernd.
Posted by: pspad | Date: 2020-05-21 19:15 | IP: IP Logged
Different color for occurences is already implemnted. I did it today. Font color will stay as standard font color.
I though about the min, length, I tested it, but when you want to seach for any special char, is better to highlight from 1 char. We will see for other users reaction. I don't want to make another tons of options
Posted by: vbr | Date: 2020-05-21 21:31 | IP: IP Logged
Hi,
thanks for implementing this feature; I agree, that a different colour for the current selection and the other matches will be useful.
However, I noticed some display problems with this highlighting, e.g. for replace all or while undoing such replacements; especially replacements using newline are affected.
Maybe the mass replacement uses selection internaly and the highlighter tries to react frequently which causes display problems (flickerig, partly removing the characters etc.)
Thanks and regards
vbr
Posted by: pspad | Date: 2020-05-22 02:44 | IP: IP Logged
Is possible to prepare some examle?
P.S. I found a problem in Editor component. There was called Paint window in the replace cycle. Fixed and I hope it will speed up replace, not prevent flickering only
Edited 1 time(s). Last edit at 2020-05-22 06:03 by pspad.
Posted by: Professor Bernd | Date: 2020-05-22 07:33 | IP: IP Logged
pspad:Different color for occurences is already implemnted. I did it today. Font color will stay as standard font color.
Thanks a lot!
pspad:I though about the min, length, I tested it, but when you want to seach for any special char, is better to highlight from 1 char. We will see for other users reaction. I don't want to make another tons of options
I understand the idea of searching for special chars, but if you highlight from 1 character upwards, you will highlight an incredible amount. Already from 2 characters on, much less hits are found, and the editor is not so full of highlights. If the user can choose the minimum length, everyone can set it as they like.
If you don't want to add this in the preferences dialog, it's enough as a setting in the PSPad.ini.
.
- Highlighting is case sensitive
Can you please switch that to case insensitive? So that different spellings are also found, e.g: "MSGBOX, MsgBox, msgbox, ..." or "IF, If, if; THEN, Then, then; OR, Or, or; AND, And, and; ..." etc.
Sometimes you write like this, sometimes like this. Or if you are working with several people on a script, everyone writes differently. Therefore all spellings should be found.
.
- Highlighting if only whitespace is selected.
Can you change it so that nothing is highlighted if the selection is whitespace only? On the screenshot you can see how chaotic this can look, if you select only 1 space for example.
Edited 1 time(s). Last edit at 2020-05-22 07:37 by Professor Bernd.
Posted by: pspad | Date: 2020-05-22 07:58 | IP: IP Logged
Yes, I understand. There is a lot of occurences for one char. But highlighting isn't provided in whole file, but in the visible area only.
It was first implementation of this functionality, I await lot of comments and there will be lot of optimalizations. e.g. whitespace on the begin won't be highlighted at all e.t.c.
Same as following feature - skins. I don't like it, but users wants it. It's ugly, slow, ...
Edited 1 time(s). Last edit at 2020-05-22 08:01 by pspad.
Posted by: Professor Bernd | Date: 2020-05-22 09:20 | IP: IP Logged
pspad:It was first implementation of this functionality, I await lot of comments and there will be lot of optimalizations. e.g. whitespace on the begin won't be highlighted at all e.t.c.
Same as following feature - skins. I don't like it, but users wants it. It's ugly, slow, ...
I know what you mean. Most of the time comments are posted to complain, but if everything works, there are no comments. For this reason I want to thank you very much for making this important feature possible, which benefits all languages. Thanks for your good work!
I especially love the functionality that I can select multiple words and the highlighting of occurrences even in comments!
I am curious what other users will say and how this feature will evolve.
Regards,
Bernd.
Posted by: felafel | Date: 2020-06-09 09:04 | IP: IP Logged
Hi,
I'm very happy of this new feature.
Unfortunately highlighting doesn't work when I click on "Switch on or off lines wrapping" toolbar button
Posted by: pspad | Date: 2020-06-09 10:25 | IP: IP Logged
felafel:Unfortunately highlighting doesn't work when I click on "Switch on or off lines wrapping" toolbar button
Hello
You are right, it doesn't work with wrapped lines. It's a new feature and calculating wrapped line possition isn't easy. Forst we need to tune up the basic functionality and as the second step make it available including wrapped text.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR