Skip to content
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

Basic usability issues with search & replace #128810

Closed
peter-bertok opened this issue Jul 16, 2021 · 1 comment
Closed

Basic usability issues with search & replace #128810

peter-bertok opened this issue Jul 16, 2021 · 1 comment
Assignees
Labels
editor-find Editor find operations under-discussion Issue is under discussion for relevance, priority, approach ux User experience issues

Comments

@peter-bertok
Copy link

Yes

  • VS Code Version: 1.58.2
  • OS Version: Windows 10 2004

Compared to other text editors or IDEs, Visual Studio Code's most basic search & replace functionality is broken in numerous ways:

When trying to make a replacement of a string, the selection is reset

  1. Select a block of code.
  2. Type in the text to replace -- this incorrectly resets the selection.
  3. Attempting to enable "find in selection" will set the selection to the first match, not the original selection.

Toggling any button resets selections if there's a matching string.

  1. Open the search & replace box, with a memorised search string in the find box.
  2. Press any button, such as "use regular expressions", "find in selection", etc...
  3. The selection will be reset (incorrectly).

(similarly, going back to a search item in the history also resets selections).

The history keyboard shortcut is the opposite of every other Windows IDE or text editor
I just assumed VS Code has no search history because it doesn't respond to the standard keystroke that all other editors use. There is also no visual "prompt" indicating that a history exists unlike most other editors (which use combo boxes).

   VS Code:       UP
   Visual Studio: DOWN
   Notepad++:     DOWN
   TextPAD:       DOWN
   IntelliJ:      ALT+DOWN
   MS Word:       DOWN

There is no way to view search history
The only method is to scroll back one at a time, unlike most other IDEs or text editors that use a combo box that can be opened and used to "pick" a specific entry.

Search in selection doesn't work consistently with "block select"
Selecting a block of code using middle-click-drag doesn't interact well with search. I can't even get reproducible scenarios! Just trying this a few times in a row resulted in different effects, including two different selection highlights on top of each other, as well as a search indicating that "nothing matches" unexpectedly:

image

image

@alexdima alexdima added the editor-find Editor find operations label Aug 17, 2021
@alexdima alexdima removed their assignment Aug 17, 2021
@rebornix rebornix added under-discussion Issue is under discussion for relevance, priority, approach ux User experience issues labels Oct 11, 2021
@amunger
Copy link
Contributor

amunger commented Dec 13, 2022

#116827 covers selection issues
#23099 for requested search history
it looks like find in selection for a block selection is working now

@amunger amunger closed this as completed Dec 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-find Editor find operations under-discussion Issue is under discussion for relevance, priority, approach ux User experience issues
Projects
None yet
Development

No branches or pull requests

4 participants