Skip to content

Commit

Permalink
Adjust "Edit" menu to remove "Copy for Forum"/"Copy for GitHub" redun…
Browse files Browse the repository at this point in the history
…dancy (arduino#491)
  • Loading branch information
Alberto Iannaccone authored Sep 2, 2021
1 parent 835e991 commit a7a1f95
Showing 1 changed file with 4 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ export class EditContributions extends Contribution {
{ execute: () => this.run('editor.action.formatDocument') }
);
registry.registerCommand(EditContributions.Commands.COPY_FOR_FORUM, {
execute: async () => {
const value = await this.currentValue();
if (value !== undefined) {
this.clipboardService.writeText(`[code]
${value}
[/code]`);
}
},
});
registry.registerCommand(EditContributions.Commands.COPY_FOR_GITHUB, {
execute: async () => {
const value = await this.currentValue();
if (value !== undefined) {
Expand All @@ -111,26 +101,21 @@ ${value}
});
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
commandId: EditContributions.Commands.COPY_FOR_FORUM.id,
label: 'Copy for Forum',
label: 'Copy for Forum (Markdown)',
order: '2',
});
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
commandId: EditContributions.Commands.COPY_FOR_GITHUB.id,
label: 'Copy for GitHub',
order: '3',
});
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
commandId: CommonCommands.PASTE.id,
order: '4',
order: '3',
});
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
commandId: CommonCommands.SELECT_ALL.id,
order: '5',
order: '4',
});
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
commandId: EditContributions.Commands.GO_TO_LINE.id,
label: 'Go to Line...',
order: '6',
order: '5',
});

registry.registerMenuAction(ArduinoMenus.EDIT__CODE_CONTROL_GROUP, {
Expand Down Expand Up @@ -195,11 +180,6 @@ ${value}
keybinding: 'CtrlCmd+Shift+C',
when: 'editorFocus',
});
registry.registerKeybinding({
command: EditContributions.Commands.COPY_FOR_GITHUB.id,
keybinding: 'CtrlCmd+Alt+C',
when: 'editorFocus',
});
registry.registerKeybinding({
command: EditContributions.Commands.GO_TO_LINE.id,
keybinding: 'CtrlCmd+L',
Expand Down Expand Up @@ -280,9 +260,6 @@ export namespace EditContributions {
export const COPY_FOR_FORUM: Command = {
id: 'arduino-copy-for-forum',
};
export const COPY_FOR_GITHUB: Command = {
id: 'arduino-copy-for-github',
};
export const GO_TO_LINE: Command = {
id: 'arduino-go-to-line',
};
Expand Down

0 comments on commit a7a1f95

Please sign in to comment.