Is there any way to navigate the search editor (whole workspace search) using only cursor keys in vscode ? I'm talking about the whole workspace search and not just the find/replace search.
Is there any way to navigate the search editor (whole workspace search) using only cursor keys in vscode ? I'm talking about the whole workspace search and not just the find/replace search.
The new search editor thankfully has ported over most of the shortcut commands you have grown to know, but for brevity, this answer will include only the default keybinds with respective command id.
The when expression most commonly associated with these keybinds, should you want to alter them, are :
inSearchEditor
hasSearchResult
searchInputBoxFocus
Context Lines
toggleSearchEditorContextLines ALT + L
Will show n lines before or after search result, for context
decreaseSearchEditorContextLines ALT + -increaseSearchEditorContextLines ALT + =Query Details
workbench.action.search.toggleQueryDetails
This will toggle the include/exclude file input boxes
Settings
toggleSearchCaseSensitive ALT + CtoggleSearchEditorRegex ALT + RtoggleSearchEditorWholeWord ALT + WLuckily, because the search editor is effectively an 'editor', you can continue to use all the keybinds that you are used to. So, in order to jump straight to the editor, you can use whatever your keybind is to jump to an editor group, default is: CTRL + 1 (commandId: workbench.action.focusFirstEditorGroup)
Navigating matches
search.action.focusNextSearchResult F4search.action.focusPreviousSearchResult SHIFT + F4selectAllSearchEditorMatches CTRL + SHIFT + LResults
Deleting result block : workbench.action.searchEditor.deleteResultBlock CTRL + SHIFT + BACKSPACE
This deletes a block of results from the editor
For example, in the picture below, if my cursor is anywhere in the 'convert.js' result block the entire convert.js matches would be removed. You can undo this with CTRL + Z
Go To Definition (effectively go to file)
editor.action.openLink for when your cursor is on the file nameNavigate Back to Input Box
search.action.focusQueryEditorWidget ESCAPEAs noted, the search editor is effectively an editor, so you can resume using CTRL + F (find) or CTRL + H (find/replace) to narrow down results even more, and the keybinds set for those are maintained as used elsewhere.
rerunSearchEditorSearch CTRL + SHIFT + R
Perhaps you deleted too many result blocks
Otherwise, while your cursor is actively in the editor (results), you have the freedom to use most of your keybinds per normal, including collapsing/folding, jumping, copying, moving to editor groups etc