Community
    • Login

    Compact Find dialogue box or bar possible

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    22 Posts 4 Posters 1.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.
    • Mr-BrunesM
      Mr-Brunes @Neil Schipper
      last edited by

      @neil-schipper said in Compact Find dialogue box or bar possible:

      Say, @mr-brunes, I wanted to ask if you have become familiar with the six variants of search command that include F3 in their shortcuts (can be seen in the Search menu).

      The reason I ask is that they offer convenient ways of performing simple searches without any UI clutter.

      Yes I’ve looked at those, and I’m sure they are useful for some folks. But for me, it took longer to think my way around how they might work than it would have taken to just type my search term in the Incremental simple search toolbar! Also they often still require the use of the dialogue box.

      Currently Incremental search ticks all my boxes and makes NP++ a lot easier to use. My only quibble is that there appears to be no way to make the toolbar permanent. However I remapped it to Ctrl-F to match Find in other apps so no brain rewiring is necessary.

      Alan KilbornA 1 Reply Last reply Reply Quote 2
      • Alan KilbornA
        Alan Kilborn @Mr-Brunes
        last edited by

        @mr-brunes said in Compact Find dialogue box or bar possible:

        My only quibble is that there appears to be no way to make the toolbar permanent

        I don’t think there is an “out of the box” way with Notepad++.

        But, if you think outside the box, there are ways.

        For example, if you use the PythonScript plugin you can put the following line in your user startup.py file:

        notepad.menuCommand(MENUCOMMAND.SEARCH_FINDINCREMENT)
        
        Mr-BrunesM 1 Reply Last reply Reply Quote 3
        • Mr-BrunesM
          Mr-Brunes @Alan Kilborn
          last edited by

          @alan-kilborn Tx - will investigate the Python plugin.

          Also for comparing Visual Studio’s Find features. How does it retrieve the original cursor position? That would be a handy thing to have available.

          Alan KilbornA 1 Reply Last reply Reply Quote 0
          • Alan KilbornA
            Alan Kilborn @Mr-Brunes
            last edited by

            @mr-brunes said in Compact Find dialogue box or bar possible:

            for comparing Visual Studio’s Find features. How does it retrieve the original cursor position?

            So looking at it again in order to answer your question…

            I find that actually it doesn’t work as well as I would like it to, sometimes producing results I don’t understand. :-(

            In theory if you backspace off your search term in the Find box, (IMO) your caret should return to where it was before you did any typing.

            Why? Well, if I don’t find what I’m looking for, I don’t want to be left at some intermediate point between where I started and end-of-file. I want to be back at where I was before doing anything.

            Say I’m on line 20 of my file and I decide I need to go to the next instance of “testing”. I start typing into the box and the most of a match I get is “test” and I’m now sitting on line 45634 of my file. Well, I needed/wanted “testing” not “test” so my caret on line 45634 is irrelevant and annoying to me. And I probably don’t remember that I need to be back on line 20 to continue working.

            Mr-BrunesM Neil SchipperN 2 Replies Last reply Reply Quote 2
            • Mr-BrunesM
              Mr-Brunes @Alan Kilborn
              last edited by Mr-Brunes

              Sure I quite appreciate the need for a sort of crumb trail to enable a “Jump to last cursor point” before one starting futzing around with search! Is that not what VS does/should do?

              Alan KilbornA 1 Reply Last reply Reply Quote 0
              • Alan KilbornA
                Alan Kilborn @Mr-Brunes
                last edited by Alan Kilborn

                @mr-brunes said in Compact Find dialogue box or bar possible:

                the need for a sort of crumb trail to enable a “Jump to last cursor point” before one starting futzing around with search! Is that not what VS does

                I think I see VS’s algorithm now. If you back out of a search by backspacing the Find box’s content down to nothing, it will leave your caret on the first letter of your match beyond your starting point. (This assumes the settings are such that a search is told to go in the “downward” direction).

                So for my example with “testing” in the Find box, if I backspace that text so it is entirely gone, my caret will be on the first “t” further in the file than where I started. It will leave this “t” selected.

                I don’t know…to me this behavior is not useful.

                But…maybe VS is being discussed too much. It started out just as a comparison point with N++. I think now it has become an off-topic discussion; sorry to all the readers.

                1 Reply Last reply Reply Quote 1
                • Neil SchipperN
                  Neil Schipper @Alan Kilborn
                  last edited by Neil Schipper

                  @alan-kilborn & @Mr-Brunes :

                  1. A “Resume Editing” button in the Find dialog as an alternative to Cancel, that dismisses the dialog and restores caret to where it was the last time the file had focus, would be convenient, although to enjoy it you’d need to be careful not to click into the file while examining matches at other locations. (There’s little enthusiasm for adding to the Find dialog, understandably because it’s already so busy [and disincentivizes learning], and the feature is maybe too arcane/nerdy to justify, though I would surely enjoy it.)

                  2. The shortcuts I mentioned in my last post support sequences like:

                  • type search text into file (if the desired text is not presently onscreen (and, if not Read Only, minor limitation))
                  • select search text
                  • find matches til the cows come home (no UI clutter)
                  • restore location (can restore the file’s ‘unmodified’ status if desired; can also keep the new text)
                  1. Though the above sequence is very convenient, the Location Navigate plugin blows it away in sophistication

                  2. When there’s a need for lots of searching and maybe copying chunks in a large file while simultaneously doing edits, nothing beats cloning to new instance (and setting it R/O for safety) on two monitors.

                  Alan KilbornA 1 Reply Last reply Reply Quote 1
                  • Alan KilbornA
                    Alan Kilborn @Neil Schipper
                    last edited by

                    @neil-schipper said in Compact Find dialogue box or bar possible:

                    A “Resume Editing” button in the Find dialog as an alternative to Cancel, that dismisses the dialog and restores caret to where it was the last time the file had focus, would be convenient, although to enjoy it you’d need to be careful not to click into the file while examining matches at other locations.

                    I think we’re only talking about caret movements that are “incremental” here. Any time you do a “Find Next” (for ex.) type caret movement, the caret is moved, period. I think also moving focus away from the (incremental) find box is enough user acceptance of the current caret position (wherever that might be) in order to not need to remember the starting position.

                    Neil SchipperN 1 Reply Last reply Reply Quote 2
                    • Neil SchipperN
                      Neil Schipper @Alan Kilborn
                      last edited by

                      @alan-kilborn said in Compact Find dialogue box or bar possible:

                      Any time you do a “Find Next” (for ex.) type caret movement, the caret is moved, period.

                      My suggestion maintains that behaviour: when dismissing the dialog with the Cancel button (or the “incremental” bar with ‘x’), the caret retains its position as per most recent Find op, exactly as now.

                      My suggestion is that after doing a bunch of searching, you can also choose a wonderful new kind of dialog dismissal which restores caret position that was recorded when dialog launched.

                      A lot of “what coders do all day” is:

                      • think about using a thing “over here”
                      • find the thing “over there (and there)”, and (re)learn stuff about it
                      • make changes “over here”

                      This is ubiquitous, and restoring the caret to where you are “really” working/editing is an annoyance if it’s not nearby, and if no advance action (like bookmarking) was taken to automate the return.

                      So the benefit of this is very similar to the benefit of calling functions in code, or “Return from interrupt” on a microprocessor: it automates resumption after completion of a subordinate task.

                      And tools should support coders, work with their behavior patterns, and delight them by anticipating and minimizing the micro-jabs of frustration that contribute to fatigue and an experience of drudgery.

                      1 Reply Last reply Reply Quote 1
                      • Lycan ThropeL
                        Lycan Thrope
                        last edited by

                        @neil-schipper said in Compact Find dialogue box or bar possible:

                        So the benefit of this is very similar to the benefit of calling functions in code, or “Return from interrupt” on a microprocessor: it automates resumption after completion of a subordinate task.

                        In this instance, Neil, I think this is a bad analogy. In the procedural programming paradigm, when the program execution comes to a function, it jumps to the function until completed, but when returned, it jumps to the next instruction after the function calling point, so this example isn’t really applicable to this point of view. :)

                        That said, I guess this would be a useful feature to someone, but I look at it like, if I need to know where I started, that’s why there’s line numbers. I usually know at what point I started the search and know where I need to go back to, so this isn’t something I’d care about, but I can see where someone might like this kind of functionality.

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