Change:
I think it should be possible to disable "Replace Preview" in the settings. Currently, whenever I want to replace a word, the "Replace Preview" opens for every file, because I have file preview disabled.
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like: <!-- score: 0.546 --- <!-- score: 0.535 --- <!-- score: 0.489 --- <!-- score: 0.473 --- <!-- score: 0.46 --<!-- potentialduplicatescomment --
Are you talking about the diff editor that opens when you click a result? What do you expect to see in that case?
Yes that's what I'm talking about. I would like to see just the file without a diff, maybe with the matches highlighted as I navigate through them in the search sidebar. Then when I click on replacing the text it would just replace it directly.
This seems reasonable and I would take a PR that adds a setting to disable the replace preview. FYI Starting point: and
I'd like to take a look at this.

Discussion:
smartCase: boolean; globalFindClipboard: boolean; location: 'sidebar' | 'panel'; <ins> useReplacePreview: boolean; </ins> } export interface ISearchConfiguration extends IFilesConfiguration {

import { ICommandHandler } from 'vs/platform/commands/common/commands'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; <del> import { ISearchHistoryService, VIEW_ID } from 'vs/platform/search/common/search'; </del> <ins> import { ISearchHistoryService, VIEW_ID, ISearchConfiguration } from 'vs/platform/search/common/search'; </ins> import { SearchView } from 'vs/workbench/parts/search/browser/searchView'; import * as Constants from 'vs/workbench/parts/search/common/constants'; import { IReplaceService } from 'vs/workbench/parts/search/common/replace';

import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { normalize } from 'vs/base/common/paths'; import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService'; <ins> import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; </ins> export function isSearchViewFocused(viewletService: IViewletService, panelService: IPanelService): boolean { let searchView = getSearchView(viewletService, panelService);

constructor(private viewer: ITree, private element: Match, private viewlet: SearchView, @IReplaceService private replaceService: IReplaceService, @IKeybindingService keyBindingService: IKeybindingService, <del> @IEditorService private editorService: IEditorService) { </del> <ins> @IEditorService private editorService: IEditorService, @IConfigurationService private configurationService: IConfigurationService) { </ins> super(Constants.ReplaceActionId, appendKeyBindingLabel(ReplaceAction.LABEL, keyBindingService.lookupKeybinding(Constants.ReplaceActionId), keyBindingService), 'action-replace'); }

} let elementToShowReplacePreview = this.getElementToShowReplacePreview(elementToFocus); this.viewer.domFocus(); <del> if (!elementToShowReplacePreview || this.hasToOpenFile()) { </del> <ins> const useReplacePreview = this.configurationService.getValue<ISearchConfiguration>().search.useReplacePreview; if (!useReplacePreview || !elementToShowReplacePreview || this.hasToOpenFile()) { </ins> this.viewlet.open(this.element, true); } else { this.replaceService.openReplacePreview(elementToShowReplacePreview, true);

return TPromise.as(true); } <del> return (this.viewModel.isReplaceActive() && !!this.viewModel.replaceString) ? </del> <ins> const useReplacePreview = this.configurationService.getValue<ISearchConfiguration>().search.useReplacePreview; return (useReplacePreview && this.viewModel.isReplaceActive() && !!this.viewModel.replaceString) ? </ins> this.replaceService.openReplacePreview(lineMatch, preserveFocus, sideBySide, pinned) : this.open(lineMatch, preserveFocus, sideBySide, pinned); }

], default: 'auto', description: nls.localize('search.collapseAllResults', "Controls whether the search results will be collapsed or expanded."), <ins> }, 'search.useReplacePreview': { type: 'boolean', default: true, description: nls.localize('search.useReplacePreview', "Controls whether to open Replace Preview when selecting or replacing a match."), </ins> } } });