Skip to content

Add a global action to add a new file in the explorer - resolves #5547 - #5597

Merged
Benjamin Pasero (bpasero) merged 2 commits into
microsoft:masterfrom
SamVerschueren:iss5547
Apr 21, 2016
Merged

Benjamin Pasero (bpasero) merged 2 commits into
microsoft:masterfrom
SamVerschueren:iss5547

Conversation

@SamVerschueren

Copy link
Copy Markdown
Contributor

Adds the possibility of binding a keyboard shortcut to a Create new file action. Resolves #5547

Benjamin Pasero (@bpasero) I believe this should do the trick :)

@msftclas

Hi Sam Verschueren (@SamVerschueren), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@msftclas

Sam Verschueren (@SamVerschueren), Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.

Thanks, MSBOT;

let workbenchActionsRegistry = <IWorkbenchActionRegistry>Registry.as(ActionExtensions.WorkbenchActions);
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(SaveFileAsAction, SaveFileAsAction.ID, SaveFileAsAction.LABEL, { primary: KeyMod.CtrlCmd | KeyMod.Shift | KeyCode.KEY_S }), category, ['save', 'as']);
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewFileAction, GlobalNewFileAction.ID, GlobalNewFileAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_N }), category, ['new', 'file']);
workbenchActionsRegistry.registerWorkbenchAction(new SyncActionDescriptor(GlobalNewUntitledFileAction, GlobalNewUntitledFileAction.ID, GlobalNewUntitledFileAction.LABEL, { primary: KeyMod.CtrlCmd | KeyCode.KEY_N }), category, ['new', 'file']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add the "untitled" to the keywords?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bpasero

Copy link
Copy Markdown
Contributor

Sam Verschueren (@SamVerschueren) cool, added some comments!

@SamVerschueren

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback, I adjusted accordingly. The only concern is the translation of newUntitledFile.

@bpasero
Benjamin Pasero (bpasero) merged commit 319548f into microsoft:master Apr 21, 2016
@bpasero

Copy link
Copy Markdown
Contributor

👍

@SamVerschueren

Copy link
Copy Markdown
Contributor Author

Awesome, thanks Benjamin Pasero (@bpasero) for helping me out and merging my PR :).

@bpasero

Copy link
Copy Markdown
Contributor

Sam Verschueren (@SamVerschueren) expecting a PR from every issue you file from now on :)

@SamVerschueren

Copy link
Copy Markdown
Contributor Author

Hehe, I'll do my best :). The project is quite complex to be honest :p.

@bpasero

Copy link
Copy Markdown
Contributor

Welcome to our life ;)

@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a global action to add a new file in the explorer

3 participants