mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
This commit is contained in:
parent
ff1f1b190e
commit
c409160ad7
@ -145,6 +145,7 @@ export default function useKeymap(CodeMirror: any) {
|
||||
'Alt-Right': 'goLineEnd',
|
||||
'Ctrl-Backspace': 'delGroupBefore',
|
||||
'Ctrl-Delete': 'delGroupAfter',
|
||||
'Ctrl-Enter': 'insertLineAfter',
|
||||
|
||||
'fallthrough': 'basic',
|
||||
};
|
||||
@ -167,6 +168,7 @@ export default function useKeymap(CodeMirror: any) {
|
||||
'Alt-Backspace': 'delGroupBefore',
|
||||
'Alt-Delete': 'delGroupAfter',
|
||||
'Cmd-Backspace': 'delWrappedLineLeft',
|
||||
'Cmd-Enter': 'insertLineAfter',
|
||||
|
||||
'fallthrough': 'basic',
|
||||
};
|
||||
|
@ -29,6 +29,7 @@ import { selectionFormattingEqual } from '../SelectionFormatting';
|
||||
import configFromSettings from './configFromSettings';
|
||||
import getScrollFraction from './getScrollFraction';
|
||||
import CodeMirrorControl from './CodeMirrorControl';
|
||||
import insertLineAfter from './editorCommands/insertLineAfter';
|
||||
|
||||
const createEditor = (
|
||||
parentElement: HTMLElement, props: EditorProps,
|
||||
@ -261,6 +262,10 @@ const createEditor = (
|
||||
}),
|
||||
keyCommand('Tab', insertOrIncreaseIndent, true),
|
||||
keyCommand('Shift-Tab', decreaseIndent, true),
|
||||
keyCommand('Mod-Enter', (_: EditorView) => {
|
||||
insertLineAfter(_);
|
||||
return true;
|
||||
}, true),
|
||||
|
||||
...standardKeymap, ...historyKeymap, ...searchKeymap,
|
||||
]),
|
||||
|
Loading…
Reference in New Issue
Block a user