20

I use VSCode in Mac system.

I know that we could use command+shift+F to search a word in a project. Is there a quick shortcut to go to the search result panel so that we could navigate through the results by up and down?

0

3 Answers 3

25

I found it. After searching by command+shift+F, typing command+downarrow sets the focus on the first element found. Then we could use up arrow and down arrow to navigate.

enter image description here

2
  • 2
    In case others hit this question and @SoftTimur's answer didn't work, my 2 cents would be to search for: search.action.focusNextSearchResult in Open Keyboard Shortcuts in the Preferences.
    – mikemols
    Commented Oct 21, 2020 at 8:04
  • 4
    @SoftTimur Thanks, that's exactly what I wanted! Such a simple keyboard shortcut, but with very poor discoverability. Commented Mar 8, 2021 at 3:51
13
+50

Key Bindings for Visual Studio Code says that F4 and ShiftF4 can be used to focus inside the search results:


enter image description here

5
  • I tried, by typing F4 and Shift+F4, we could indeed go through all the search results. But I would prefer a shortcut to move the focus to the search result panel so that we could navigate search results by up and down arrows.
    – SoftTimur
    Commented Feb 18, 2020 at 15:40
  • I'm not using VSC, so question: Where is the focus after F4?
    – harrymc
    Commented Feb 18, 2020 at 15:42
  • After F4, the focus is in the main editing panel of the files where the search result is.
    – SoftTimur
    Commented Feb 18, 2020 at 15:44
  • Try to find something in the key bindings, but I'm not sure it exists (⌘+k and ⌘+s).
    – harrymc
    Commented Feb 18, 2020 at 16:43
  • 2
    This one is better than CMD+arrows because the focus/cursor stays in the editor, so you can start editing right away. You can just press f4 or shift+f4 repeatedly to navigate the search results.
    – User
    Commented Nov 4, 2021 at 15:03
3

There is also the search.action.focusSearchList command that focuses the search list and then you can go through the results with up/down arrows. enter image description here

1
  • Could you include a screenshot of this in action?
    – Burgi
    Commented May 13, 2021 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .