mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-08 13:16:33 +00:00
Adjust "Edit" menu to remove "Copy for Forum"/"Copy for GitHub" redundancy (#491)
This commit is contained in:
parent
835e9913ae
commit
a7a1f95ced
@ -79,16 +79,6 @@ export class EditContributions extends Contribution {
|
|||||||
{ execute: () => this.run('editor.action.formatDocument') }
|
{ execute: () => this.run('editor.action.formatDocument') }
|
||||||
);
|
);
|
||||||
registry.registerCommand(EditContributions.Commands.COPY_FOR_FORUM, {
|
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 () => {
|
execute: async () => {
|
||||||
const value = await this.currentValue();
|
const value = await this.currentValue();
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
@ -111,26 +101,21 @@ ${value}
|
|||||||
});
|
});
|
||||||
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
||||||
commandId: EditContributions.Commands.COPY_FOR_FORUM.id,
|
commandId: EditContributions.Commands.COPY_FOR_FORUM.id,
|
||||||
label: 'Copy for Forum',
|
label: 'Copy for Forum (Markdown)',
|
||||||
order: '2',
|
order: '2',
|
||||||
});
|
});
|
||||||
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
||||||
commandId: EditContributions.Commands.COPY_FOR_GITHUB.id,
|
commandId: CommonCommands.PASTE.id,
|
||||||
label: 'Copy for GitHub',
|
|
||||||
order: '3',
|
order: '3',
|
||||||
});
|
});
|
||||||
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
|
||||||
commandId: CommonCommands.PASTE.id,
|
|
||||||
order: '4',
|
|
||||||
});
|
|
||||||
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
||||||
commandId: CommonCommands.SELECT_ALL.id,
|
commandId: CommonCommands.SELECT_ALL.id,
|
||||||
order: '5',
|
order: '4',
|
||||||
});
|
});
|
||||||
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
registry.registerMenuAction(ArduinoMenus.EDIT__TEXT_CONTROL_GROUP, {
|
||||||
commandId: EditContributions.Commands.GO_TO_LINE.id,
|
commandId: EditContributions.Commands.GO_TO_LINE.id,
|
||||||
label: 'Go to Line...',
|
label: 'Go to Line...',
|
||||||
order: '6',
|
order: '5',
|
||||||
});
|
});
|
||||||
|
|
||||||
registry.registerMenuAction(ArduinoMenus.EDIT__CODE_CONTROL_GROUP, {
|
registry.registerMenuAction(ArduinoMenus.EDIT__CODE_CONTROL_GROUP, {
|
||||||
@ -195,11 +180,6 @@ ${value}
|
|||||||
keybinding: 'CtrlCmd+Shift+C',
|
keybinding: 'CtrlCmd+Shift+C',
|
||||||
when: 'editorFocus',
|
when: 'editorFocus',
|
||||||
});
|
});
|
||||||
registry.registerKeybinding({
|
|
||||||
command: EditContributions.Commands.COPY_FOR_GITHUB.id,
|
|
||||||
keybinding: 'CtrlCmd+Alt+C',
|
|
||||||
when: 'editorFocus',
|
|
||||||
});
|
|
||||||
registry.registerKeybinding({
|
registry.registerKeybinding({
|
||||||
command: EditContributions.Commands.GO_TO_LINE.id,
|
command: EditContributions.Commands.GO_TO_LINE.id,
|
||||||
keybinding: 'CtrlCmd+L',
|
keybinding: 'CtrlCmd+L',
|
||||||
@ -280,9 +260,6 @@ export namespace EditContributions {
|
|||||||
export const COPY_FOR_FORUM: Command = {
|
export const COPY_FOR_FORUM: Command = {
|
||||||
id: 'arduino-copy-for-forum',
|
id: 'arduino-copy-for-forum',
|
||||||
};
|
};
|
||||||
export const COPY_FOR_GITHUB: Command = {
|
|
||||||
id: 'arduino-copy-for-github',
|
|
||||||
};
|
|
||||||
export const GO_TO_LINE: Command = {
|
export const GO_TO_LINE: Command = {
|
||||||
id: 'arduino-go-to-line',
|
id: 'arduino-go-to-line',
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user