Double clicking over a word function works great, but it can be much greater than ever
-
@PeterJones said in Double clicking over a word function works great, but it can be much greater than ever:
I rarely use the “Select and Find Next” or “Find (Volatile) Next” actions. But I quite frequently double-click. For example, I double-click then type over the selection (or paste over the selection, or what have you). If double-click automatically selected the word, then found the next occurrence of that word, then when I started typing (or pasting) to overwrite that word, it would edit the wrong instance of that word. ⇒ QED: I was able to supply an example to support @Alan-Kilborn’s (and my) opinion that changing the double-click behavior as you describe would negatively impact my double-click general use-case.
Also, assuming you haven’t re-mapped the keys, Ctrl+F3 is the “Select and Find Next” command, as shown in my screenshot above. Note that the first part of that command is “Select”: it already starts by selecting the active word, which is equivalent to the double-click you are doing first. So if you really wanted to make things more efficient for you, just type Ctrl+F3 rather than double-click-then-Ctrl+F3.Sorry I have made a mistake. What I really want is to include “Ctrl” + “F3” and leaving cursor position unchanged, so your mentioned inconvenience really does not exist, and if you type further or go to find next word, it will not cause any conflict.
-
@W-TX said in Double clicking over a word function works great, but it can be much greater than ever:
What I really want is to include “Ctrl” + “F3” and leaving cursor position unchanged
It appears you are still under a misunderstanding of what
Ctrl+F3
does. It is a highlight-and-find-next command. If you do not want it to find the next instance, then the behavior you want is notCtrl+F3
, and you should stop calling it that. Inherent in theCtrl+F3
is moving the cursor.If you have behavior that you would like to replicate, you are going to have to describe the actual behavior of what state cursor, selection, and find-buffer should be in, rather than relying on your understandings as to what the keyboard shortcuts do.
-
Of course, one could write a script to do something special on the double-click notification. Like grab the selected text and so a find-next on it.
EDIT: Well, I guess I haven’t kept up with this thread…but when I try to I get really confused.
-
@Alan-Kilborn said in Double clicking over a word function works great, but it can be much greater than ever:
Of course, one could write a script to do something special on the double-click notification. Like grab the selected text and so a find-next on it.
EDIT: Well, I guess I haven’t kept up with this thread…but when I try to I get really confused.What I want is to enhance double click function not only to highlight the word as usual, but also to trig a find function to get the word into search target without moving cursor position, saving two key strokes “Ctrl”+“F3”. So after that , one can press “F3” to start searching next.
This is a practice of paid Textpad software I used before and find the function really useful.
-
@W-TX ,
get the word into search target without moving cursor position
Thank you for the better description.
Personally, I still think it’s a bad idea: if I already have something I want in the search target so that F3 will find the next instance of that search, but want to double-click a word to type over it in the meantime, I’d be pretty upset if the developers decided that suddenly my desired F3 target would be replaced just because I happened to use the mouse double-click to select a word.
find the function really useful.
I don’t, as described above; but I can see how someone with a different standard workflow might. We can disagree on this opinion.
to enhance double click function
This Forum is not the feature request / bug tracker for Notepad++ … we are here to help others use the software. Development is tracked in github, as mentioned in the FAQs on this Forum.
That said, you may feel free to make a feature request in the official location, as described in the Forum FAQ: if you do make a feature request as a result of this discussion, it’s considered polite to paste a link to that request here in the discussion. However, I would personally not want to see this implemented, because it will interfere with my standard workflow.
As an alternative, and thus avoiding messing up the application for me and many others who want search to remain independent of selection, @Alan-Kilborn gave an idea for a way to customize the behavior for yourself: use PythonScript or another of the scripting plugins to hook into the double-click notification, and insert the contents of the current word into the search buffer. If you don’t have the skills to research how to do that yourself, someone here might take pity on you if you ask nicely – but please remember that this isn’t a code-writing forum, and anything you might get will be from the generosity of volunteers.
-
You seem to be in love with this idea.
You first brought it up over a year ago HEREAlso Ctrl+F3 isn’t 2 keystrokes, it is 1.
Nobody would call “A”, which you get by pressing Shift+a, two keystrokes.
But if you insist that Ctrl+F3 is two keystrokes, use the Shortcut Mapper to reassign it to a “single” keystroke.As I read it, you’ve got two actions you want to do here:
- double-click to select a word
- press a keycombo (when you are ready) to do a find-next
I would do it this way:
- click the desired word (or move the caret to it)
- execute a Select and Find Next operation, again, when I’m ready (of course after assigning it to a single keycombo of my liking)
The differences seem, well, just semantics.
-
Considering it a bit more, I’ve changed my mind about a script doing it.
I was thinking that it was all wanted in one step via the double-click, but as more discussion has occurred, it appears to be a two-step thing.Thus, I’ve already given what I think is an acceptable solution (which is really no more than standard N++ already does).
Plus, there is no way to “set the search buffer term” via a script, without bringing up the Find window, and I don’t think that would be deemed desirable here.
-
@Alan-Kilborn said in Double clicking over a word function works great, but it can be much greater than ever:
But if you insist that Ctrl+F3 is two keystrokes, use the Shortcut Mapper to reassign it to a “single” keystroke.
Could you please tell where to find Shortcut Mapper.
-
@W-TX said in Double clicking over a word function works great, but it can be much greater than ever:
Could you please tell where to find Shortcut Mapper.
Peter told you about Shortcut Mapper, including where to find it, 7 hours ago. But maybe pictures work where the written word apparently fails:
-
@Alan-Kilborn Thank you. I changed F4 key from searching previous result to CTRL+F4, and SHIFT +F3 to F4, so F4 key, one stroke, does searching previous word function. Work great!
Through this post, I really get my 2 requests satisfied:
-
Find a way to show the highlighted word in 2 windows.
-
Find a way to use F4 key to search previous word!
I remember that last time I visited this site, no shortcut mapper was available. But now it works great! I want to know on which version the shortcut mapper was added.
Thank you for everyone who helps.
-
-
@W-TX said in Double clicking over a word function works great, but it can be much greater than ever:
Through this post, I really get my 2 requests satisfied
I am absolutely stunned by this statement. :-)
I remember that last time I visited this site, no shortcut mapper was available.
This is not a true statement.
I want to know on which version the shortcut mapper was added.
TBH, I’m not sure (and it isn’t worth looking through really old/ancient versions to find exactly where), but it has been around at the very least 7 years, and I’d believe, a lot longer than that. Maybe the Research Dept. will figure out the answer.
-
@Alan-Kilborn said in Double clicking over a word function works great, but it can be much greater than ever:
Maybe the Research Dept. will figure out the answer.
- 7.0 from 2016 has Shortcut Mapper
- 6.0 from 2012 has Shortcut Mapper
- 4.0 from 2006 has Shortcut Mapper
@W-TX joined May 21, 2019, when v7.7 (May 19) was brand new, and asked the earlier question in Nov 2019 (when v7.8.1 was the newest).
Because I was curious:
IiIiIGRvdWJsZWNsaWNrRXh0cmEucHkNCg0KaHR0cHM6Ly9jb21tdW5pdHkubm90 ZXBhZC1wbHVzLXBsdXMub3JnL3RvcGljLzE5ODc5L2RvdWJsZS1jbGlja2luZy1v dmVyLWEtd29yZC1mdW5jdGlvbi13b3Jrcy1ncmVhdC1idXQtaXQtY2FuLWJlLW11 Y2gtZ3JlYXRlci10aGFuLWV2ZXINCg0KSGlnaGphY2tzIHRoZSBkb3VibGUtY2xp Y2sgYWN0aW9uOg0K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bm90ZXBhZC5tZW51Q29t bWFuZCg0MzA0OCkgICMgc2VsZWN0IGFuZCBmaW5kIG5leHQgLi4uIGNhbm5vdCBm aW5kIHRoZSByaWdodCBNRU5VQ09NTUFORC5TRUFSQ0hfLi4uLiBlbnVtDQogICAg ZWRpdG9yLmdvdG9Qb3Moc2UpDQogICAgZWRpdG9yLnNldFNlbGVjdGlvbihzcyxz ZSkNCiAgICBub3RlcGFkLm1lbnVDb21tYW5kKE1FTlVDT01NQU5ELlNFQVJDSF9G SU5EUFJFVikNCiAgICBub3RlcGFkLm1lbnVDb21tYW5kKE1FTlVDT01NQU5ELlNF QVJDSF9GSU5ETkVYVCkNCg0KDQplZGl0b3IuY2FsbGJhY2soZG91YmxlY2xpY2tf ZXh0cmEsIFtTQ0lOVElMTEFOT1RJRklDQVRJT04uRE9VQkxFQ0xJQ0tdKQ0KDQoj IHVzZSBlZGl0b3IuY2xlYXJDYWxsYmFja3MoW1NDSU5USUxMQU5PVElGSUNBVElP Ti5ET1VCTEVDTElDS10pIGJlZm9yZSByZS1ydW5uaW5nIHRoaXMgc2NyaXB0IGR1 cmluZyBkZWJ1Zw0K
-
@PeterJones said in Double clicking over a word function works great, but it can be much greater than ever:
Further, Notepad++'s double-click behavior is the expected behavior, to anyone who has used MS Notepad, or MS Word, or any other word processing or text editing software I’ve used … and even other software, such as my web-browsers or my linux terminal programs: it selects the active word. Making it behave differently just in Notepad++, would break the expectation of many people.
Here is my further thought that meets your practice custom and have nothing to change but will bring more convenience:
-
Double clicking a word or highlighting a few words by pressing and moving cursor changes nothing. No code change.
-
Press F3 key: if no words are highlighted, search is as usual; if words are highlighted, then the highlighted words becomes new search target. It does not change current Notepad++ user’s practice custom in following 2 situations:
a. If a user continuously press F3 key, because when F3 key is pressed the target key is highlighted.
b. If user moves cursor and types something, there is no highlighted word, press F3 key still keeps its search target words unchanged.
The user practice custom only changes when double clicking or highlighting a few words by pressing and moving cursor and pressing F3 key, then the highlighted words will be used as new search target.
It will save key strokes:
You don’t have to use Ctrl+F to pop up the find window to enter new search target.
You don’t have to use Ctrl+F3 to enter new search target, just use F3.It is a suggestion!
-
-
@W-TX I am a hardware engineer and use Notepad++ to write VHDL coding. The most used functions are to search next and search back to make sure that any signal is properly used in any places. Textpad I used before has the design and when I turned to Notepad++, I immediately has the bad feeling about lacking the function. I think the code for the addition of F3 new function changes a little and everything is there: Pressing F3 moves the highlighted words into target buffer if they exist, and remains are unchanged.
-
@W-TX said in Double clicking over a word function works great, but it can be much greater than ever:
; if words are highlighted, then the highlighted words becomes new search target.
That would still break my workflow – it’s changing the search target with my permission. F3 means “next of the current search”, not “change the search value and then find next”. If you want to change the search target in the same keystroke as find-next, then use Ctrl+F3 (you don’t need double-click). If you don’t like hitting Ctrl, then change the shortcut as has been described.
I’ll give a hint: you might find what’s hidden in BASE64 to be of interest.
-
@PeterJones said in Double clicking over a word function works great, but it can be much greater than ever:
If you want to change the search target in the same keystroke as find-next, then use Ctrl+F3 (you don’t need double-click)
You cannot do it as you show when highlighted are words, not A word. You have to use Ctrl+F to bring up the find window! With my suggestion, you never have to do it.
You said that it still change your workflow. It does not! If you do not highlight anything, nothing changes. If you highlight anything and press F3, then it changes.
-
@W-TX said in Double clicking over a word function works great, but it can be much greater than ever:
If you highlight anything and press F3, then it changes.
Then that breaks my workflow. I don’t want highlighted text to change the search target when I hit F3. What if I have searched for XXX, then highlighted YYY for some other reason, then hit F3 to find the next XXX: with your description, it will try to find YYY instead. That’s not what I want.
I am not going to argue this anymore. Just because it doesn’t bother you doesn’t mean it won’t bother anyone else.
-
Pj4+IE1FTlVDT01NQU5ELnZhbHVlc1s0MzA0OF0NCk5wcC5NRU5VQ09NTUFORC5TRUFSQ0hfU0VUQU5ERklORE5FWFQ