Community
    • Login

    survey: Incremental search usefulness

    Scheduled Pinned Locked Moved General Discussion
    79 Posts 17 Posters 17.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Craig HillC
      Craig Hill
      last edited by

      cmeriaux,

      Do you use it ?
      I rarely use the incremental (CTRL/ATL/I) search as the find (CTRL F) search is so powerful, either searching in a single or across many documents using the “Find All in”.

      Do you need regular expression support ?
      I do not at this time.

      Do you need an incremental mode in the find panel ?
      Not needed, but could be nice as an added option. As MAPJe71 stated, this “Find Next” does perform this incremental search, but a “Find Next in All Opened” could be useful.

      Do you need an incremental mode in the replace panel ?
      Yes, I would make good use of the functionality to find and incremental replace in Notepad++. I desperately need one that can work across multiple open files within Notepad++. I often open several hundred files that contain a unique string in each file that I’d like to be able to manipulate across all files at once.

      Do you need an incremental mode in the mark panel ?
      I don’t use this functionality.

      1 Reply Last reply Reply Quote 0
      • Alan MacdonaldA
        Alan Macdonald
        last edited by

        Essential. I would switch to another text editor if NPP didn’t have it.

        1 Reply Last reply Reply Quote 0
        • gstaviG
          gstavi
          last edited by

          I don’t use it.
          I like the find window that pops in the middle of the screen over the modern approach that opens in corners.
          Whatever is done for incremental search please don’t break the traditional find.

          1 Reply Last reply Reply Quote 0
          • andrea galassoA
            andrea galasso
            last edited by andrea galasso

            i use the incremental search because is immediate, and i discover this “search mode” after trying to teach Notepad++ to my mum (for a blind user is the only fast way for do a text search having the results on focus rather than on a other window. there’s also a NVDA plugin that help this function to be more usefulness.)

            the normal search (ctrl+f and ctrl+h) don’t send to NVDA any output after “Find” or other button is pressed.

            1 Reply Last reply Reply Quote 2
            • Alan KilbornA
              Alan Kilborn
              last edited by

              I like incremental search as well.

              1 Reply Last reply Reply Quote 0
              • asvcA
                asvc
                last edited by

                I would try to resurrect this topic and ask @Scott-Sumner & @cmeriaux if something akin of VIM search was considered as the valid milestone for the roadmap.

                Two key differences that come to mind:

                1. Regexp support in the search field using real-time highlighting.
                2. Ability to create marks for the lines matching the search results.

                Latter would probably translate into the optional propagation of the search results into the “search results window” in Notepad++.

                1 Reply Last reply Reply Quote 1
                • cmeriauxC
                  cmeriaux
                  last edited by

                  @asvc “incremental search” and “classic search” shares the same code. So in theory, it could be easy to add a “reg exp” option in the incremental search.
                  About mark creation, I don’t know.

                  In an other hand, lot’s of feature are not accepted by the project owner. it would be better to have @Don-HO approval before dev otherwise it would be a waste of time.

                  Alan KilbornA 1 Reply Last reply Reply Quote 2
                  • Alan KilbornA
                    Alan Kilborn @cmeriaux
                    last edited by

                    @cmeriaux said in survey: Incremental search usefulness:

                    it could be easy

                    Very few things ever end up being “easy”, in software development.
                    I’ve not attempted dev on Notepad++ itself, but I do other software dev.
                    Anything that seems easy on the surface often has hard-to-overcome implications, and often in the end can’t be implemented at all (without huge risk).
                    But, I wish people would stop using the “E” word, even prefaced with “In theory”

                    Here’s the first “hard” thing about it, the entire idea:

                    I don’t know that I like the idea of incremental search being regex-capable.
                    Typing regexes isn’t like typing normal text.
                    With normal text you pretty much know where you are going; part of the flow of typing.
                    In typing regex it is more of an experimental process; try something, see what matches, back it out, add something new…
                    If I’m using incremental search, my goal is to find something really fast, not mess around with a regex.

                    Also, one presumes that dot matches newline would never be enabled for this?
                    As an example of why this would be bad:
                    Type .* into the incremental search box and you are instantly sitting with your caret at end of file, with no great way to get back to where you started so you can do a better incremental search.
                    Maybe the answer is, don’t type .*, but…

                    I suppose one could argue, if you don’t like the regex part of this feature, don’t enable it. Presumes that the feature would have an enable/disable.

                    @asvc said:

                    Ability to create marks for the lines matching the search results

                    Surely there is already sufficient mechanism for this type of operation WITHOUT involving the incremental search feature.

                    1 Reply Last reply Reply Quote 2
                    • cmeriauxC
                      cmeriaux
                      last edited by

                      @ Alan-Kilborn I’m sorry but I don’t like your tone. You can moderate your language and show a little more respect and diplomacy.
                      When i say “incremental search” and “classic search” shares the same code. So in theory, it could be easy to add …” it’s because I know the code behind. I didn’t said that without knowing anything behind. I’m a contributor, ok it’s only 14 commits but it’s better than nothing.
                      You may write less on the forum and contribute more on github

                      Alan KilbornA 1 Reply Last reply Reply Quote 2
                      • Alan KilbornA
                        Alan Kilborn @cmeriaux
                        last edited by

                        @cmeriaux

                        I’m not sure what was objectionable about my language/tone/respectfulness/diplomacy in the posting above. Sure, sometimes my posts are a little “dicey” but I don’t see it this time around. :-)

                        I stick by my “nothing is easy” stance. I fight that perception (and the fallout from it) on a daily basis at work. Code can be shared by functionalities, but that doesn’t necessarily make anything easier; sometimes it is a burden that makes things harder. “Bound by your history” and all that…

                        I have built the Notepad++ source code myself, and have experimented with it a bit to see how certain things work, but I choose not to contribute any changes, because of one more thing that I’ve observed that is not “easy”: It is not easy (or even likely) to get your code changes accepted. I see you agree with that now that I reread your posting: “lot’s of feature are not accepted by the project owner”

                        I have seen some of your contributions and I thank you for them as they have made Notepad++ better. You are lucky that your small amount of commits have been welcomed into the codebase.
                        By the way, I don’t think 14 commits is “small”; more like “medium” amount. :-)

                        BUT…

                        In commenting on my “tone” you seem to have ignored the rest of the content of my earlier posting; where I raise some points about possible changes to incremental search. I’d certainly be interested in what you think, as would others I’m sure.

                        1 Reply Last reply Reply Quote 1
                        • guy038G
                          guy038
                          last edited by guy038

                          Hello @cmeriaux, @alan-kilborn, @asvc and All,

                          Like Alan, I’m really dubious about the advantages of regular expressions in incremental search ! A simple example :

                          Let’s suppose you would like to highlight all occurrences of ranges of characters between the uppercase letter I and the closest lowercase letter w, so the regex I.*?w :

                          • First, we tick the two options Highlight all and Match case

                          • Pressing the I letter, I get ### occurrences

                          • Pressing the . char => Just 1 occurrence : this regex ;-))

                          • As we could search for the literal string I. OR for the regex I., we need an option that would had been previously ticked. Let’s assume it’s the case. Then :

                          - I       =>   Any uppercase letter I
                          - I.      =>   Any uppercase letter I followed by ONE STANDARD character
                          - I.*     =>   Any uppercase letter I followed by ALL STANDARD characters of CURRENT line
                          - I.*?    =>   Any uppercase letter I followed by the SHORTEST range, possibly NULL of STANDARD chars => Letter I ONLY
                          - I.*?w   =>   Any uppercase letter I followed by the SHORTEST range, possibly NULL of STANDARD chars till a lowercase letter w
                          
                          

                          Seemingly, there’s no logic on such a progression ! I, personally, prefer to use the Mark dialog to get, at once, all occurrences of the regex I.*?w, with the possibility of bookmarking all the lines where the different occurrences occur ;-))


                          Some thoughts :

                          • It could be of some interest to add an option Match whole word to the traditional incremental search !

                          • To easily switch between the incremental dialog, keeping it opened and the main text window, I, personally, use :

                            • The Ctrl + Alt + I shortcut to focus on the Incremental dialog, again

                            • A double hit on the Windows key to focus on the main text window, again ( A work-around ! )

                          • To close the incremental dialog, when focused, I simply hit the ESC key

                          => Surely, easier methods for such actions could be implemented ;-))


                          As a conclusion, I believe that the Incremental search should remain rather basic, at it is in some browsers, while hitting the Ctrl + F shortcut !

                          Best Regards,

                          guy038

                          1 Reply Last reply Reply Quote 1
                          • asvcA
                            asvc
                            last edited by

                            @cmeriaux , @Alan-Kilborn , @guy038 .

                            It sounds like “incremental” is a bit of a point of disagreement here.
                            How about we replace it with the “regular search in the docked panel”?

                            To elaborate on the usefulness of the real-time highlighting (massive time-saver!), here as a short example using the message above.

                            Say I want to wrangle lines that begin with the - I.* pattern:

                            VIM selection

                            Instant visual feedback reaffirms correctness of the chosen regexp and allows user to adjust it on the fly.

                            Alan KilbornA 1 Reply Last reply Reply Quote 3
                            • Alan KilbornA
                              Alan Kilborn @asvc
                              last edited by

                              @asvc

                              The type of search demonstrated (effective screencast, BTW) does indeed seem useful as something different than the incremental search feature.

                              I like that it doesn’t move the caret and thus the user’s view at his data doesn’t “jump” as I mentioned before. Even if the match extends below the user’s view I think the screen should not change (too much of a lost of context)?

                              asvcA 1 Reply Last reply Reply Quote 1
                              • asvcA
                                asvc @Alan Kilborn
                                last edited by

                                @Alan-Kilborn said in survey: Incremental search usefulness:

                                Even if the match extends below the user’s view I think the screen should not change

                                Precisely. And in the VIM world, there is a concept of “action”.

                                Check this out:
                                Replace

                                1. Search
                                2. Perform action on the result.

                                Hence I have asked this question.

                                Alan KilbornA 1 Reply Last reply Reply Quote 0
                                • Alan KilbornA
                                  Alan Kilborn @asvc
                                  last edited by

                                  @asvc said in survey: Incremental search usefulness:

                                  VIM world, there is a concept of “action”.

                                  Sure, I understand the VIM thing.
                                  There have been requests for it before that have gone unheeded.
                                  It’s OK…but it’s probably not a valuable thing for the vast majority of N++ users.

                                  Hence I have asked this question.

                                  Which is probably a more “mainstream” (valuable) way of doing it for N++ users.
                                  Let’s see if it gets implemented.

                                  1 Reply Last reply Reply Quote 0
                                  • cmeriauxC
                                    cmeriaux
                                    last edited by

                                    Here is a screencast of the POC I’ve did. https://youtu.be/_s6BJf4sdw4
                                    I’ve added controls to select the search mode:

                                    • Mode normal
                                    • Mode extended
                                    • Regular exp
                                    • . matches new line (for regex)

                                    It’s less than 100 code line. So it has good chances to be accepted by the author.
                                    Using regexp mode is very nice, specially if you’are not the RegExp king

                                    Would you prefer several control (like in the screen cast) or a combo box to select the search mode ? I hesitate.

                                    Alex MA Alan KilbornA EkopalypseE asvcA 5 Replies Last reply Reply Quote 2
                                    • Alex MA
                                      Alex M @cmeriaux
                                      last edited by

                                      @cmeriaux i would prefer several control by far!!!

                                      1 Reply Last reply Reply Quote 0
                                      • Alan KilbornA
                                        Alan Kilborn @cmeriaux
                                        last edited by Alan Kilborn

                                        @cmeriaux

                                        So the one of us here (@guy038) that understands regex and its applicability and usefulness better than anyone else, makes a statement like:

                                        I’m really dubious about the advantages of regular expressions in incremental search

                                        and yet we proceed? Well…okay…

                                        Would you prefer several control (like in the screen cast) or a combo box to select the search mode ? I hesitate.

                                        I would vote for a dropdown.

                                        It is easier to change with a radiobutton approach – don’t use checkboxes like in the screencast! – but since @guy038 and I and … aren’t ever going to change it away from Normal, it’s okay. :-)

                                        It seems like the text for the modes should exactly correspond to that used on the Find screen as well – I noticed in your screencast that it does NOT correspond.

                                        @Alex-M said:

                                        i would prefer several control by far!!!

                                        Can you clarify what that means? After several readings it doesn’t make sense, to me at least.

                                        James SiversonJ 1 Reply Last reply Reply Quote 0
                                        • Alan KilbornA
                                          Alan Kilborn @cmeriaux
                                          last edited by

                                          @cmeriaux

                                          One more point: I thought @Ekopalypse said somewhere that if incremental search were going to be improved, he’d like to see the size of the text input box be wider, and probably scaled to the size of the main Notepad++ window. How about making that change as well?

                                          1 Reply Last reply Reply Quote 0
                                          • guy038G
                                            guy038
                                            last edited by guy038

                                            Hi, @cmeriaux, @alan-kilborn, @asvc and All,

                                            Ah, Christophe ! Your Youtube animation is really valuable ! As they say in France: “A single image is better than a long speech !”. So, when I said :

                                            Like Alan, I’m really dubious about the advantages of regular expressions in incremental search !

                                            Now, I won’t be so hesitant and suspicious about it ! Indeed, despite of the fact that, in regex mode, the result of search, necessarily, does not respect a logic progression, I do see, now, the great advantage of an immediate match, as mentioned by @asvc, especially for beginners and intermediate regular expression users ;-))

                                            I certainly do not want to appear as a guru, always having the best opinion on any subject. I am not infallible and able to recognize that I was wrong and that my judgment was a hasty fear ! As always, only practice will tell us the real potential of Incremental search, in extended or regex mode but I think it would be really useful to include this new feature in a next release ;-))

                                            Most of a time, we’ll probably use the normal mode. But I admit that the possibility, from times to time, to run a regex or extended search is really a + !

                                            Best Regards,

                                            guy038

                                            Alan KilbornA 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            The Community of users of the Notepad++ text editor.
                                            Powered by NodeBB | Contributors