Vscode: There is no search history

Created on 19 Apr 2016  路  12Comments  路  Source: microsoft/vscode

Can't easily redo previous search, which is very annoying and decreases productivity.

  • VSCode Version: 1.0.0
  • OS Version: OS X 10.11.4

Steps to Reproduce:

  1. Press Shift+Cmd+F
  2. Search for something
  3. Search for another thing
  4. Press UP key (or Cmd+Z or whatever)

Expected: Show previous search term, like all other editors
Result: Nothing happens

VS Code:
VS Code Search Example

Atom:
Atom Search Example

feature-request search

Most helpful comment

Implemented following support:

Search input in Search view
Find input in Find widget

  • alt+up : Shows the previous term in history
  • alt+down : Shows the next term in history

Customize key board short cuts

  • search.history.showPrevious : alt+up
  • search.history.showNext : alt+down
  • find.history.showPrevious : alt+up
  • find.history.showNext : alt+down

All 12 comments

@kieferrm heard you are taking over search :-)

I really liked this feature in Atom and would use it regularly.

I would love to give this feature a shot. Any chance you'd accept a contribution on this one?

@Urik We are open to contributions, but sorry to say that I have already started on this and planning to push it today. If you are interested I can point you to other interesting features. Thanks.

That's so great to hear Sandy, I've been lusting over that feature since I started working with VSCode!
I'd love to see these possible features, thanks.

Implemented following support:

Search input in Search view
Find input in Find widget

  • alt+up : Shows the previous term in history
  • alt+down : Shows the next term in history

Customize key board short cuts

  • search.history.showPrevious : alt+up
  • search.history.showNext : alt+down
  • find.history.showPrevious : alt+up
  • find.history.showNext : alt+down

this work well but i feel its kinda hidden behind the alt+. is there any way to have it just be up/down on the search fields?

@hipstersmoothie You can customize the key board short cuts overriding the commands and keys mentioned in comment

Thats great, still, the defaults should be intuitive and natural. Not sure that the use of ALT satisfies that. Is there any downside to not using ALT? These are single line queries (absent the use of \n), anyway, so I would think up and down do not have a meaning in these contexts.

@gandhis1 Up and Down are already used to navigate between the input boxes (Search, Replace, Files include, Files exclude). Using Alt goes with other key board short cuts for actions - Toggle match case, reg ex, whole word.

I am open for the suggestions to change the default one to more better ones.

Thanks for the feedback

@sandy081 navigation between fields is actually expected by tab, shift+tab. So I don't see any reason to not just use arrows for search/replace history in those fields.

Thanks for the feedback. Filed the following issue to change it

https://github.com/Microsoft/vscode/issues/12645

Was this page helpful?
0 / 5 - 0 ratings