CudaText
CudaText copied to clipboard
Suggestion: Find dialog improvements
I have a couple of suggestions for the Find dialog, hoping you'll find them useful. As a developer of QSearch plugin for AkelPad text editor, I really miss these tiny things:
-
In the "Wrapped search" mode, there is no sign of passing the file boundary when the search continues from the very top/bottom of the files. For example, the QSearch plugin changes the background color of its "Find what" field to green to indicate this fact. Some other editors use the status bar to explicitly say that the search has been continued from the top/bottom of the file. Please consider adding this to CudaText.
-
Incremental search (also known as search-as-you-type) is available only when "Highlight all matches" is available. For example, the QSearch plugin has a separate option named "Search: On-the-fly mode" which actually means the very same as Incremental search and search-as-you-type. This option works with ordinary text as well as with regular expressions, and there is another, separate option "Highlight all" which is responsible for highlighting the matches. So, two separate options. If you think that the search-as-you-type mode can have a negative impact on performance in large files, you may borrow the following idea from the QSearch plugin:
findall_count_delay = 400
Delay, in milliseconds, before starting to count all the occurrences
when both the "Auto Count All" and On-the-fly mode are on.
I mean, in case of Incremental search and huge file, the Incremental search can actually be started not immediately, but only after e.g. 400 ms passed after the last character has been typed. Example: user is typing "abc" where, say, 100 ms are passed between typing "a" and "b" and then, say, 150 ms are passed between typing "b" and "c". The Incremental search had not been started at this point. Now, only after 400 ms has passed after pressing "c", the Incremental search is started. Please consider adding a separate option for Incremental search into CudaText.
Some other editors use the status bar to explicitly say that the search has been continued from the top/bottom of the file.
added. good small idea.
loot at statusbar - 'border crossed'
about 2nd suggestion - 'separate Incremental / Highlight-all options'. let's the active Cud users tell what they think. i am sceptical, sorry. more work for me, very small profit.
@veksha @miroslavmatas @jairomartineza @vivalzar
about 2nd suggestion - 'separate Incremental / Highlight-all options'. let's the active Cud users tell what they think. i am sceptical, sorry. more work for me, very small profit.
I am with you on that, Alexey… but - my situation is maybe different - happy user of Find in Lines, so my incremental search is always via external plugin…
happy user of Find in Lines, so my incremental search is always via external plugin…
Did you mean "Find in Files"? I did not seem to find "Find in Lines"... I'm just starting my journey with CudaText and I'm already very impressed by how powerful, handy and thought-out it is!
Find In Lines is a part of CudaExt plugin
On one hand, there already are 2 ways of doing incremental search: highlight all and find in lines. On the other hand, it's true that highlight all does 2 things. We could split this button in 2 buttons. You are afraid that the find dlg will be too cluttered?
You are afraid that the find dlg will be too cluttered?
and this too. Cud has 8 buttons in a row
Cud has 8 buttons in a row
Maybe get rid of the multi-line button and make it automatic like in vs-code. If there are several lines in the find box, enlarge it. And reduce it when there are only one line.
You can then split the highlight all button in 2. All the code is already there presumably. It will just be organized differently.
Just a thought.
i for sure don't want to remove 'multi line input' button. it gives the good hint to new users.
i will think about new button later, after 1.185.0.
it gives the good hint to new users.
When the find field is empty, it contains the string Find what
. Maybe we can replace it with Find what (Ctrl+Enter for a new line)
?
@Vivalzar but the "+" button has this info in the hint. i don't want to remove "+" and make the multi-line automatic. why? if I turn on the "+" mode, I want to see it permanently, not auto-toggled when I call the find.
It was just an idea. Other editors don't have a multi-line mode, they have just a way to enter a new line.
@veksha do you think that we can remove '+' button and make multi-line look automatic?
Personally, i am not against that.
seems we can close this topic, as 2 wishes from 1st post are implemented already, it seems:
- In the "Wrapped search" mode, there is no sign of passing the file boundary when the search continues from the very top/bottom of the files. For example, the QSearch plugin changes the background color of its "Find what" field to green to indicate this fact. Some other editors use the status bar to explicitly say that the search has been continued from the top/bottom of the file. Please consider adding this to CudaText.
option "find_wrapped_blinking" (default is empty: turned off).
- Incremental search (also known as search-as-you-type) is available only when "Highlight all matches" is available.
and this was implemented in last months too, AFAIR by the request from @pintassilgo. find-dialog has new 'Im' checkbox-option for 'immediate search'.
if topic contains other wishes, pls find them and report them to a new issue, pls.