Change:
Being able to interact with the files that appear in would be useful. A few examples that come to mind: file matched by search. Clicking the file in the search result and then pressing does not work. Right-clicking the file does not show the command. Right-clicking the file does not show (where the file could be renamed). The only option I've found is to click one of the matches to open the file, right click the tab, select and rename the file using the side bar ( or right-click). file matched by search. multiple files matched by search. multiple files from the search result. two files matched by search. When right-clicking a file in , I think all the options that are shown when right-clicking a file in should be shown. Then any options by extensions would also be available. The keyboard shortcuts and should probably keep their current behavior. Also, it should be possible to select multiple files, similar to in .
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.47 --<!-- potentialduplicatescomment --
, can we take this up separately ? ( Like rename , delete etc ) I would like to work on that if that is the case. Please let me know , Thanks :)
I think a "reveal in explorer" command for search results would be really useful and I would take a PR for that. But I don't want to replicate all the the other commands and functionality of the explorer.
Just adding "Reveal in Explorer" goes a long way :) I've created a different feature request for allowing selecting multiple files:
To be consistent the command should be called ! Also I do not understand the logic why it is at the top. Is not this after copy commands?
, The command was called "Reveal in Side Bar" but preferred "Reveal in Explorer". Also i can change the position and add it where ever you both suggest, Thanks :)
You're already looking at the side bar, so I don't think "Reveal in side bar" makes sense. I don't really like it for the tab context menu either, I think we should be more specific. Also I agree, I think it should be at the bottom, not the top

Discussion:
import { Action } from 'vs/base/common/actions'; import { distinct } from 'vs/base/common/arrays'; <del> import { illegalArgument } from 'vs/base/common/errors'; </del> <ins> import { illegalArgument, onUnexpectedError } from 'vs/base/common/errors'; </ins> import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import * as objects from 'vs/base/common/objects'; import * as platform from 'vs/base/common/platform';

import { Extensions as WorkbenchExtensions, IWorkbenchContribution, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions'; import { Extensions as ViewExtensions, IViewsRegistry } from 'vs/workbench/common/views'; import { getMultiSelectedResources } from 'vs/workbench/contrib/files/browser/files'; <del> import { ExplorerFolderContext, ExplorerRootContext, FilesExplorerFocusCondition } from 'vs/workbench/contrib/files/common/files'; </del> <ins> import { ExplorerFolderContext, ExplorerRootContext, FilesExplorerFocusCondition, IExplorerService, VIEWLET_ID as VIEWLET_ID_FILES } from 'vs/workbench/contrib/files/common/files'; </ins> import { OpenAnythingHandler } from 'vs/workbench/contrib/search/browser/openAnythingHandler'; import { OpenSymbolHandler } from 'vs/workbench/contrib/search/browser/openSymbolHandler'; import { registerContributions as replaceContributions } from 'vs/workbench/contrib/search/browser/replaceContributions';

import * as Constants from 'vs/workbench/contrib/search/common/constants'; import { getWorkspaceSymbols } from 'vs/workbench/contrib/search/common/search'; import { ISearchHistoryService, SearchHistoryService } from 'vs/workbench/contrib/search/common/searchHistoryService'; <del> import { FileMatchOrMatch, ISearchWorkbenchService, RenderableMatch, SearchWorkbenchService } from 'vs/workbench/contrib/search/common/searchModel'; </del> <ins> import { FileMatchOrMatch, ISearchWorkbenchService, RenderableMatch, SearchWorkbenchService, FileMatch } from 'vs/workbench/contrib/search/common/searchModel'; </ins> import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; import { ISearchConfiguration, ISearchConfigurationProperties, PANEL_ID, VIEWLET_ID, VIEW_CONTAINER, VIEW_ID } from 'vs/workbench/services/search/common/search'; import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; <ins> import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace'; import { ExplorerViewlet } from 'vs/workbench/contrib/files/browser/explorerViewlet'; </ins> registerSingleton(ISearchWorkbenchService, SearchWorkbenchService, true); registerSingleton(ISearchHistoryService, SearchHistoryService, true);

} }); <ins> CommandsRegistry.registerCommand({ id: Constants.RevealInSideBarForSearchResults, handler: (accessor, fileMatch: FileMatch) => { const viewletService = accessor.get(IViewletService); const explorerService = accessor.get(IExplorerService); const contextService = accessor.get(IWorkspaceContextService); const uri = fileMatch.resource(); viewletService.openViewlet(VIEWLET_ID_FILES, false).then((viewlet: ExplorerViewlet) => { if (uri && contextService.isInsideWorkspace(uri)) { const explorerView = viewlet.getExplorerView(); if (explorerView) { explorerView.setExpanded(true); explorerService.select(uri, true).then(() => explorerView.focus(), onUnexpectedError); } } }); } }); const RevealInSideBarForSearchResultsCommand: ICommandAction = { id: Constants.RevealInSideBarForSearchResults, title: nls.localize('revealInSideBar', "Reveal in Explorer") }; MenuRegistry.appendMenuItem(MenuId.SearchContext, { command: RevealInSideBarForSearchResultsCommand, when: ContextKeyExpr.and(Constants.FileFocusKey, Constants.HasSearchResults), group: '2_files', }); </ins> MenuRegistry.appendMenuItem(MenuId.SearchContext, { command: { id: Constants.ReplaceActionId,

export const ToggleCaseSensitiveCommandId = 'toggleSearchCaseSensitive'; export const ToggleWholeWordCommandId = 'toggleSearchWholeWord'; export const ToggleRegexCommandId = 'toggleSearchRegex'; <ins> export const RevealInSideBarForSearchResults = 'search.action.revealInSideBar'; </ins> export const ToggleSearchViewPositionCommandId = 'search.action.toggleSearchViewPosition';