New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option for seeding find string from editor on ctrl + f #20768
Comments
It's not really wrong. If you don't like it, we can make a setting for it. |
Thank you @joaomoreno @alexandrudima @joaomoreno I compared it to other editors (Atom and Sublime). If there is person they like, maybe an option to turn it on and off. |
To expand on the reporters description, the current behavior makes it oddly difficult to "find again". For example I just searched a Javascript file for the start of arrow functions |
I'm having the same issue that @coreyfarrell explained. Here is my usual/desired workflow:
If anyone knows a way to work around this or just stop the editor from changing the Find that would be great. |
Continued from #17562 as requested. That said, this is really about usablity of If a multi-line selection is made and
Reasons:
|
@mfrost66 I wish. At one point ctrl+f behaved something like that, but it confused OSX users. |
-- Sorry for the English, I used Google Translator -- @rebornix I found these new functions:
I did not understand their operation. Besides that, what I have reported is not happening. My problem is: Now if I had selected the word and pressed Ctrl + f, then yes it should go to the search field. |
@rebornix Can you check and answer me, please? |
Can @rebornix or anyone check (@joaomoreno @alexandrudima ) and reopen this issue? At least it is being open to there is the possibility of someone looking at it. |
@Tekbr I see what you mean, you are actually asking for populating from selected range but you don't want to auto populate the word under cursor, right? |
-- Sorry for the English, I used Google Translator -- @rebornix See this gif. This can not happen, in my opinion. Place in the search field the word where the cursor is stopped (beginning - middle and end of word). By pressing Ctrl + F or Ctrl + Shift + F or clicking on the magnifying glass (search) in the sidebar. Now, if I had selected the word, fine, that's correct, like showing the gif below. Note: Can you explain to me what new functions are? - if possible with a gif. Thank you.
|
@rebornix Can you check and answer me, please? |
|
-- Sorry for the English, I used Google Translator -- @rebornix Which does not solve the problem of the question made in the first post. Can you please reopen the question? I showed and I mentioned in the above comment the problem. |
My suggestion for dealing with this issue would be to extend "off" = (For total control and consistency it would have be an array of options, so that "cursor" would not imply "selection". Disabling it would then be the empty array.) Personally, i usually search by selection or modifying the previous search, so either having my previous search be replaced by whatever is under the cursor or not having the option of searching by selection at all is not very helpful. |
-- Sorry for the English, I used Google Translator -- A week went by, and no answer was given by @rebornix . Even though he had previously reported that the problem had not been corrected. It can not even reopen the case, even showing the problem's gif and what the problem is. I know the same could be busy with other problems, but take 1 minute to be able to respond or less reopen the question he can not. I know you can claim, "Why do not you offer a PR?" If I had known I would have done it or at least helped. But I do not have conditions right now. With a closed question it will not be possible for anyone to look at it. So if @rebornix can not solve the question, who can someone ( @joaomoreno @alexandrudima ) reopen for it? Because it is a resource request and said nothing because of not implementing the resource. Thank you. |
@Tekbr sorry for the late response, I was working on endgame and testing so didn't catch up with github notifications. Your suggestion of a enum value for |
-- Sorry for the English, I used Google Translator -- @rebornix Thanks for the answer. The idea of being an |
Even after a year of use, this is by far the most frustrating thing about VS Code. I often use find --> edit --> find again functionality, and this makes it very hard to do. More often than not, I already press Cmd+F Enter before I realize that the search term has changed, thus losing my work location. In my opinion, the "selection" option should be the default. The use cases are:
If you choose a word by mouse, it's trivial to double-click it and then search. If choosing by keyboard, you can press Cmd+D to select the word before searching. Currently the only way to make the find --> edit --> refind flow work is to disable |
Still no solution? This is a very annoying feature. This issue has been raised for 2 years. Means it has annoyed thousands of users for 2 years. Gosh. |
A workaround here is to use |
This is a super annoying bug, and it's going to drive many users away from VS Code. If you think about it like this:
Any time that a program eliminates manual work the end user did and forces them to do it again is a huge problem. This is exacerbating by nobody expecting this "cursor" behavior by default - no other editor works that way by default. Keep the highlighting for sure - that's a deliberate action on the user's part, so the behavior is expected. But the default behavior right now is a bug, and it's one that thousands of developers are encountering multiple times every day. How can we escalate this? Is it possible to place a bounty on it? IMO "backlog" is an awful milestone for something this annoying and this impactful to the core user experience. |
This makes CMD/CTRL+F consistent with other editors/IDEs.
I've opened a pull request to completely replace the current behavior: #80477 Can someone with merge permission please have a look? It's a really small change. |
@wkornewald The pull request has a single conflicting file that must be resolved. |
@wkornewald did you look into the conflicting file? |
@rebornix if I update the PR, will it be merged? I don’t want to waste time on this because for a long time nobody at MS was interested in my PR. |
@wkornewald the challenge here is we support ctrl/cmd+f to search the word under cursor from day 1 and there are enormous users enjoy using this feature, including myself. I'm not convinced that this feature should be removed. |
They should give the option to change the behaviour. |
@rebornix So should it stay configurable and the default could switch to the more consistent behavior that all other software is using? Especially when working with multiple IDEs/editors, you feel the switching cost every time. And my PR is currently the number 3 highest-voted PR, so the current behavior really can’t be that popular. |
I'm fine with this feature so long as it doesn't interfere with what is already in the Find Widget buffer. |
I found pressing |
Version 1.57.1 With a word selected and the above setting enabled, I hit |
This now works for me in 1.67.0 after restarting VScode. However, this only works in the editor. Is it possible to get it working in Jupyter notebooks as well? |
This feature has been really annoying for me because I want to change the contents of the search string WHEN and ONLY WHEN I want to change it, regardless of the selection. The search string changing whenever I select something with Ctrl+D doesn't just make sense to me - from my intuition, they're separate tools and there's no reason they should be related in any way. |
@jzyrobert Yes, I agree, this does appear to be fixed now and it seems like this should be closed. Yay. Here's a screenshot of the options I see in version 1.67.2 on macOS: @ashegoulding I'm curious what you mean by "editor.find.seedSearchStringFromSelection has no effect." If you search for that option in settings, do you see the three options from my screenshot? Does changing between the options have any effect on whether the text in the "Find" box changes when CTRL+f (or CMD+f) is pressed? I think what should happen is:
|
closing as completed since |
-- Sorry for the English, I used Google Translator --
If I put the cursor on the word (start, middle or end of word) and press
ctrl + f
, that word is automatically placed in the search.Is not that wrong?
The correct would be if I selected the word and then pressing
ctrl + f
it should appear in the search field.The text was updated successfully, but these errors were encountered: