mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Desktop: Add "duplicate line" command in Markdown editor (#4873)
Ref: https://discourse.joplinapp.org/t/duplicate-line-command/12650/15
This commit is contained in:
parent
f87ff54e3d
commit
b1ea3f3ad1
@ -596,6 +596,7 @@ function useMenu(props: Props) {
|
||||
menuItemDic.attachFile,
|
||||
separator(),
|
||||
menuItemDic['editor.deleteLine'],
|
||||
menuItemDic['editor.duplicateLine'],
|
||||
menuItemDic['editor.toggleComment'],
|
||||
menuItemDic['editor.sortSelectedLines'],
|
||||
menuItemDic['editor.indentLess'],
|
||||
|
@ -87,6 +87,10 @@ const declarations: CommandDeclaration[] = [
|
||||
name: 'editor.deleteLine',
|
||||
label: () => _('Delete line'),
|
||||
},
|
||||
{
|
||||
name: 'editor.duplicateLine',
|
||||
label: () => _('Duplicate line'),
|
||||
},
|
||||
{
|
||||
name: 'editor.undo',
|
||||
label: () => _('Undo'),
|
||||
|
@ -35,6 +35,7 @@ export default function() {
|
||||
'toggleSideBar',
|
||||
'toggleVisiblePanes',
|
||||
'editor.deleteLine',
|
||||
'editor.duplicateLine',
|
||||
'editor.undo',
|
||||
'editor.redo',
|
||||
'editor.indentLess',
|
||||
|
@ -46,6 +46,7 @@ const defaultKeymapItems = {
|
||||
{ accelerator: 'Shift+Cmd+P', command: 'commandPalette' },
|
||||
{ accelerator: 'F1', command: 'help' },
|
||||
{ accelerator: 'Cmd+D', command: 'editor.deleteLine' },
|
||||
{ accelerator: 'Shift+Cmd+D', command: 'editor.duplicateLine' },
|
||||
{ accelerator: 'Cmd+Z', command: 'editor.undo' },
|
||||
{ accelerator: 'Cmd+Y', command: 'editor.redo' },
|
||||
{ accelerator: 'Cmd+[', command: 'editor.indentLess' },
|
||||
@ -87,6 +88,7 @@ const defaultKeymapItems = {
|
||||
{ accelerator: 'Ctrl+Shift+P', command: 'commandPalette' },
|
||||
{ accelerator: 'F1', command: 'help' },
|
||||
{ accelerator: 'Ctrl+D', command: 'editor.deleteLine' },
|
||||
{ accelerator: 'Shift+Ctrl+D', command: 'editor.duplicateLine' },
|
||||
{ accelerator: 'Ctrl+Z', command: 'editor.undo' },
|
||||
{ accelerator: 'Ctrl+Y', command: 'editor.redo' },
|
||||
{ accelerator: 'Ctrl+[', command: 'editor.indentLess' },
|
||||
|
Loading…
Reference in New Issue
Block a user