Compact Find dialogue box or bar possible
-
I could see a compact Find/Replace/Mark UI across the top of my N++ window, like this where I show the Python console window in this location:
-
@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.
-
@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)
-
@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.
-
@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.
-
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?
-
@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.
-
-
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.)
-
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)
-
Though the above sequence is very convenient, the Location Navigate plugin blows it away in sophistication
-
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.
-
-
@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.
-
@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.
-
@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.