提交 09e120ac 编写于 作者: R Rob Lourens

Fix #50256 - hook up cmd+f for new settings editor

上级 8994a584
......@@ -9,17 +9,17 @@ import { VSash } from 'vs/base/browser/ui/sash/sash';
import { Widget } from 'vs/base/browser/ui/widget';
import * as arrays from 'vs/base/common/arrays';
import { Delayer, ThrottledDelayer } from 'vs/base/common/async';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IStringDictionary } from 'vs/base/common/collections';
import { getErrorMessage, isPromiseCanceledError, onUnexpectedError } from 'vs/base/common/errors';
import { Emitter, Event } from 'vs/base/common/event';
import { ArrayNavigator } from 'vs/base/common/iterator';
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
import * as strings from 'vs/base/common/strings';
import URI from 'vs/base/common/uri';
import { TPromise } from 'vs/base/common/winjs.base';
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
import { Command, EditorExtensionsRegistry, IEditorContributionCtor, registerEditorContribution } from 'vs/editor/browser/editorExtensions';
import { EditorExtensionsRegistry, IEditorContributionCtor, registerEditorContribution } from 'vs/editor/browser/editorExtensions';
import { CodeEditorWidget } from 'vs/editor/browser/widget/codeEditorWidget';
import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
import * as editorCommon from 'vs/editor/common/editorCommon';
......@@ -30,9 +30,8 @@ import { MessageController } from 'vs/editor/contrib/message/messageController';
import { SelectionHighlighter } from 'vs/editor/contrib/multicursor/multicursor';
import * as nls from 'vs/nls';
import { ConfigurationTarget } from 'vs/platform/configuration/common/configuration';
import { ContextKeyExpr, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ILogService } from 'vs/platform/log/common/log';
import { IProgressService } from 'vs/platform/progress/common/progress';
import { Registry } from 'vs/platform/registry/common/platform';
......@@ -50,21 +49,20 @@ import { ResourceEditorModel } from 'vs/workbench/common/editor/resourceEditorMo
import { PREFERENCES_EDITOR_ID } from 'vs/workbench/parts/files/common/files';
import { DefaultSettingsRenderer, FolderSettingsRenderer, IPreferencesRenderer, UserSettingsRenderer, WorkspaceSettingsRenderer } from 'vs/workbench/parts/preferences/browser/preferencesRenderers';
import { SearchWidget, SettingsTarget, SettingsTargetsWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets';
import { CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS, IPreferencesSearchService, ISearchProvider, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_FILE, SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING, SETTINGS_EDITOR_COMMAND_SEARCH } from 'vs/workbench/parts/preferences/common/preferences';
import { CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS, IPreferencesSearchService, ISearchProvider } from 'vs/workbench/parts/preferences/common/preferences';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
import { IFilterResult, IPreferencesService, ISearchResult, ISetting, ISettingsEditorModel, ISettingsGroup } from 'vs/workbench/services/preferences/common/preferences';
import { DefaultPreferencesEditorInput, PreferencesEditorInput } from 'vs/workbench/services/preferences/common/preferencesEditorInput';
import { DefaultSettingsEditorModel, SettingsEditorModel } from 'vs/workbench/services/preferences/common/preferencesModels';
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
export class PreferencesEditor extends BaseEditor {
public static readonly ID: string = PREFERENCES_EDITOR_ID;
private defaultSettingsEditorContextKey: IContextKey<boolean>;
private focusSettingsContextKey: IContextKey<boolean>;
private searchFocusContextKey: IContextKey<boolean>;
private headerContainer: HTMLElement;
private searchWidget: SearchWidget;
private sideBySidePreferencesWidget: SideBySidePreferencesWidget;
......@@ -88,7 +86,7 @@ export class PreferencesEditor extends BaseEditor {
) {
super(PreferencesEditor.ID, telemetryService, themeService);
this.defaultSettingsEditorContextKey = CONTEXT_SETTINGS_EDITOR.bindTo(this.contextKeyService);
this.focusSettingsContextKey = CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(this.contextKeyService);
this.searchFocusContextKey = CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(this.contextKeyService);
this.delayedFilterLogging = new Delayer<void>(1000);
this.localSearchDelayer = new Delayer(100);
this.remoteSearchThrottle = new ThrottledDelayer(200);
......@@ -115,7 +113,7 @@ export class PreferencesEditor extends BaseEditor {
this.searchWidget = this._register(this.instantiationService.createInstance(SearchWidget, this.headerContainer, {
ariaLabel: nls.localize('SearchSettingsWidget.AriaLabel', "Search settings"),
placeholder: nls.localize('SearchSettingsWidget.Placeholder', "Search Settings"),
focusKey: this.focusSettingsContextKey,
focusKey: this.searchFocusContextKey,
showResultCount: true
}));
this._register(this.searchWidget.onDidChange(value => this.onInputChanged()));
......@@ -1238,117 +1236,3 @@ class SettingsEditorContribution extends AbstractSettingsEditorContribution impl
}
registerEditorContribution(SettingsEditorContribution);
abstract class SettingsCommand extends Command {
protected getPreferencesEditor(accessor: ServicesAccessor): PreferencesEditor {
const activeControl = accessor.get(IEditorService).activeControl;
if (activeControl instanceof PreferencesEditor) {
return activeControl;
}
return null;
}
}
class StartSearchDefaultSettingsCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.focusSearch();
}
}
}
const command = new StartSearchDefaultSettingsCommand({
id: SETTINGS_EDITOR_COMMAND_SEARCH,
precondition: ContextKeyExpr.and(CONTEXT_SETTINGS_EDITOR),
kbOpts: { primary: KeyMod.CtrlCmd | KeyCode.KEY_F }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(command.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class FocusSettingsFileEditorCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.focusSettingsFileEditor();
}
}
}
const focusSettingsFileEditorCommand = new FocusSettingsFileEditorCommand({
id: SETTINGS_EDITOR_COMMAND_FOCUS_FILE,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyCode.DownArrow }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(focusSettingsFileEditorCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class ClearSearchResultsCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.clearSearchResults();
}
}
}
const clearSearchResultsCommand = new ClearSearchResultsCommand({
id: SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyCode.Escape }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(clearSearchResultsCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class FocusNextSearchResultCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.focusNextResult();
}
}
}
const focusNextSearchResultCommand = new FocusNextSearchResultCommand({
id: SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyCode.Enter }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(focusNextSearchResultCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class FocusPreviousSearchResultCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.focusPreviousResult();
}
}
}
const focusPreviousSearchResultCommand = new FocusPreviousSearchResultCommand({
id: SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyMod.Shift | KeyCode.Enter }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(focusPreviousSearchResultCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class EditFocusedSettingCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.editFocusedPreference();
}
}
}
const editFocusedSettingCommand = new EditFocusedSettingCommand({
id: SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyMod.CtrlCmd | KeyCode.US_DOT }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(editFocusedSettingCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
......@@ -27,12 +27,13 @@ import { BaseEditor } from 'vs/workbench/browser/parts/editor/baseEditor';
import { EditorOptions, IEditor } from 'vs/workbench/common/editor';
import { SearchWidget, SettingsTarget, SettingsTargetsWidget } from 'vs/workbench/parts/preferences/browser/preferencesWidgets';
import { ISettingsEditorViewState, SearchResultIdx, SearchResultModel, SettingsAccessibilityProvider, SettingsDataSource, SettingsRenderer, SettingsTreeController, SettingsTreeFilter, TreeElement } from 'vs/workbench/parts/preferences/browser/settingsTree';
import { IPreferencesSearchService, ISearchProvider } from 'vs/workbench/parts/preferences/common/preferences';
import { IPreferencesSearchService, ISearchProvider, CONTEXT_SETTINGS_EDITOR, CONTEXT_SETTINGS_SEARCH_FOCUS } from 'vs/workbench/parts/preferences/common/preferences';
import { IPreferencesService, ISearchResult, ISettingsEditorModel } from 'vs/workbench/services/preferences/common/preferences';
import { SettingsEditor2Input } from 'vs/workbench/services/preferences/common/preferencesEditorInput';
import { DefaultSettingsEditorModel } from 'vs/workbench/services/preferences/common/preferencesModels';
import { CancellationToken } from 'vs/base/common/cancellation';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
const $ = DOM.$;
......@@ -65,6 +66,8 @@ export class SettingsEditor2 extends BaseEditor {
private viewState: ISettingsEditorViewState;
private searchResultModel: SearchResultModel;
private inSettingsEditorContextKey: IContextKey<boolean>;
private searchFocusContextKey: IContextKey<boolean>;
constructor(
@ITelemetryService telemetryService: ITelemetryService,
......@@ -74,7 +77,8 @@ export class SettingsEditor2 extends BaseEditor {
@IInstantiationService private instantiationService: IInstantiationService,
@IPreferencesSearchService private preferencesSearchService: IPreferencesSearchService,
@ILogService private logService: ILogService,
@IEnvironmentService private environmentService: IEnvironmentService
@IEnvironmentService private environmentService: IEnvironmentService,
@IContextKeyService contextKeyService: IContextKeyService
) {
super(SettingsEditor2.ID, telemetryService, themeService);
this.delayedModifyLogging = new Delayer<void>(1000);
......@@ -83,6 +87,9 @@ export class SettingsEditor2 extends BaseEditor {
this.remoteSearchThrottle = new ThrottledDelayer(200);
this.viewState = { settingsTarget: ConfigurationTarget.USER };
this.inSettingsEditorContextKey = CONTEXT_SETTINGS_EDITOR.bindTo(contextKeyService);
this.searchFocusContextKey = CONTEXT_SETTINGS_SEARCH_FOCUS.bindTo(contextKeyService);
this._register(configurationService.onDidChangeConfiguration(() => this.refreshTreeAndMaintainFocus()));
}
......@@ -94,21 +101,35 @@ export class SettingsEditor2 extends BaseEditor {
}
setInput(input: SettingsEditor2Input, options: EditorOptions, token: CancellationToken): Thenable<void> {
this.inSettingsEditorContextKey.set(true);
return super.setInput(input, options, token)
.then(() => {
this.render(token);
});
}
clearInput(): void {
this.inSettingsEditorContextKey.set(false);
super.clearInput();
}
layout(dimension: DOM.Dimension): void {
this.searchWidget.layout(dimension);
this.layoutSettingsList(dimension);
}
focus(): void {
this.focusSearch();
}
focusSearch(): void {
this.searchWidget.focus();
}
clearSearchResults(): void {
this.searchWidget.clear();
}
private createHeader(parent: HTMLElement): void {
this.headerContainer = DOM.append(parent, $('.settings-header'));
......@@ -123,7 +144,8 @@ export class SettingsEditor2 extends BaseEditor {
const searchContainer = DOM.append(this.headerContainer, $('.search-container'));
this.searchWidget = this._register(this.instantiationService.createInstance(SearchWidget, searchContainer, {
ariaLabel: localize('SearchSettings.AriaLabel', "Search settings"),
placeholder: localize('SearchSettings.Placeholder', "Search settings")
placeholder: localize('SearchSettings.Placeholder', "Search settings"),
focusKey: this.searchFocusContextKey
}));
this._register(this.searchWidget.onDidChange(() => this.onSearchInputChanged()));
this._register(DOM.addStandardDisposableListener(this.searchWidget.domNode, 'keydown', e => {
......
......@@ -22,7 +22,7 @@ import { KeybindingsEditor } from 'vs/workbench/parts/preferences/browser/keybin
import { OpenRawDefaultSettingsAction, OpenSettingsAction, OpenGlobalSettingsAction, OpenGlobalKeybindingsFileAction, OpenWorkspaceSettingsAction, OpenFolderSettingsAction, ConfigureLanguageBasedSettingsAction, OPEN_FOLDER_SETTINGS_COMMAND, OpenGlobalKeybindingsAction, OpenSettings2Action } from 'vs/workbench/parts/preferences/browser/preferencesActions';
import {
IKeybindingsEditor, IPreferencesSearchService, CONTEXT_KEYBINDING_FOCUS, CONTEXT_KEYBINDINGS_EDITOR, CONTEXT_KEYBINDINGS_SEARCH_FOCUS, KEYBINDINGS_EDITOR_COMMAND_DEFINE, KEYBINDINGS_EDITOR_COMMAND_REMOVE, KEYBINDINGS_EDITOR_COMMAND_SEARCH,
KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS
KEYBINDINGS_EDITOR_COMMAND_COPY, KEYBINDINGS_EDITOR_COMMAND_RESET, KEYBINDINGS_EDITOR_COMMAND_COPY_COMMAND, KEYBINDINGS_EDITOR_COMMAND_SHOW_SIMILAR, KEYBINDINGS_EDITOR_COMMAND_FOCUS_KEYBINDINGS, KEYBINDINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_SEARCH, CONTEXT_SETTINGS_EDITOR, SETTINGS_EDITOR_COMMAND_FOCUS_FILE, CONTEXT_SETTINGS_SEARCH_FOCUS, SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS, SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING, SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING, SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING
} from 'vs/workbench/parts/preferences/common/preferences';
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IWorkbenchContributionsRegistry, Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions';
......@@ -34,6 +34,7 @@ import { IEditorRegistry, EditorDescriptor, Extensions as EditorExtensions } fro
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { PreferencesSearchService } from 'vs/workbench/parts/preferences/electron-browser/preferencesSearch';
import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences';
import { Command } from 'vs/editor/browser/editorExtensions';
registerSingleton(IPreferencesSearchService, PreferencesSearchService);
......@@ -323,4 +324,118 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
title: `${category}: ${OpenWorkspaceSettingsAction.LABEL}`,
},
when: new RawContextKey<string>('workbenchState', '').notEqualsTo('empty')
});
\ No newline at end of file
});
abstract class SettingsCommand extends Command {
protected getPreferencesEditor(accessor: ServicesAccessor): PreferencesEditor | SettingsEditor2 {
const activeControl = accessor.get(IEditorService).activeControl;
if (activeControl instanceof PreferencesEditor || activeControl instanceof SettingsEditor2) {
return activeControl;
}
return null;
}
}
class StartSearchDefaultSettingsCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.focusSearch();
}
}
}
const startSearchCommand = new StartSearchDefaultSettingsCommand({
id: SETTINGS_EDITOR_COMMAND_SEARCH,
precondition: ContextKeyExpr.and(CONTEXT_SETTINGS_EDITOR),
kbOpts: { primary: KeyMod.CtrlCmd | KeyCode.KEY_F }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(startSearchCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class ClearSearchResultsCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor) {
preferencesEditor.clearSearchResults();
}
}
}
const clearSearchResultsCommand = new ClearSearchResultsCommand({
id: SETTINGS_EDITOR_COMMAND_CLEAR_SEARCH_RESULTS,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyCode.Escape }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(clearSearchResultsCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class FocusSettingsFileEditorCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor instanceof PreferencesEditor) {
preferencesEditor.focusSettingsFileEditor();
}
}
}
const focusSettingsFileEditorCommand = new FocusSettingsFileEditorCommand({
id: SETTINGS_EDITOR_COMMAND_FOCUS_FILE,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyCode.DownArrow }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(focusSettingsFileEditorCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class FocusNextSearchResultCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor instanceof PreferencesEditor) {
preferencesEditor.focusNextResult();
}
}
}
const focusNextSearchResultCommand = new FocusNextSearchResultCommand({
id: SETTINGS_EDITOR_COMMAND_FOCUS_NEXT_SETTING,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyCode.Enter }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(focusNextSearchResultCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class FocusPreviousSearchResultCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor instanceof PreferencesEditor) {
preferencesEditor.focusPreviousResult();
}
}
}
const focusPreviousSearchResultCommand = new FocusPreviousSearchResultCommand({
id: SETTINGS_EDITOR_COMMAND_FOCUS_PREVIOUS_SETTING,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyMod.Shift | KeyCode.Enter }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(focusPreviousSearchResultCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
class EditFocusedSettingCommand extends SettingsCommand {
public runCommand(accessor: ServicesAccessor, args: any): void {
const preferencesEditor = this.getPreferencesEditor(accessor);
if (preferencesEditor instanceof PreferencesEditor) {
preferencesEditor.editFocusedPreference();
}
}
}
const editFocusedSettingCommand = new EditFocusedSettingCommand({
id: SETTINGS_EDITOR_COMMAND_EDIT_FOCUSED_SETTING,
precondition: CONTEXT_SETTINGS_SEARCH_FOCUS,
kbOpts: { primary: KeyMod.CtrlCmd | KeyCode.US_DOT }
});
KeybindingsRegistry.registerCommandAndKeybindingRule(editFocusedSettingCommand.toCommandAndKeybindingRule(KeybindingsRegistry.WEIGHT.editorContrib()));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册