Add folding keyboard shortcuts
This commit is contained in:
parent
fd1956dbf6
commit
bde88881b2
|
|
@ -18,6 +18,7 @@ import {
|
||||||
foldGutter,
|
foldGutter,
|
||||||
indentOnInput,
|
indentOnInput,
|
||||||
bracketMatching,
|
bracketMatching,
|
||||||
|
foldKeymap,
|
||||||
} from "@codemirror/language";
|
} from "@codemirror/language";
|
||||||
import { languages } from "@codemirror/language-data";
|
import { languages } from "@codemirror/language-data";
|
||||||
import { highlightSelectionMatches, searchKeymap } from "@codemirror/search";
|
import { highlightSelectionMatches, searchKeymap } from "@codemirror/search";
|
||||||
|
|
@ -54,6 +55,7 @@ export class Editor {
|
||||||
const kmap = keymap.of([
|
const kmap = keymap.of([
|
||||||
...defaultKeymap,
|
...defaultKeymap,
|
||||||
...searchKeymap,
|
...searchKeymap,
|
||||||
|
...foldKeymap,
|
||||||
{ key: "Mod-z", run: () => undo(file.target) },
|
{ key: "Mod-z", run: () => undo(file.target) },
|
||||||
{ key: "Mod-shift-z", run: () => redo(file.target) },
|
{ key: "Mod-shift-z", run: () => redo(file.target) },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue