Skip to content

Commit

Permalink
Switch back to the default keymap for code folding.
Browse files Browse the repository at this point in the history
  • Loading branch information
drgrice1 committed Oct 11, 2024
1 parent 63d7bce commit d7c846c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openwebwork/pg-codemirror-editor",
"version": "0.0.1-beta.6",
"version": "0.0.1-beta.7",
"description": "PG CodeMirror Editor",
"author": "The WeBWorK Project",
"license": "MIT",
Expand Down
17 changes: 2 additions & 15 deletions src/pg-codemirror-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,7 @@ import {
toggleLineComment,
toggleBlockCommentByLine
} from '@codemirror/commands';
import {
bracketMatching,
foldGutter,
foldCode,
unfoldCode,
foldAll,
unfoldAll,
indentOnInput,
indentUnit,
syntaxTree
} from '@codemirror/language';
import { bracketMatching, foldGutter, foldKeymap, indentOnInput, indentUnit, syntaxTree } from '@codemirror/language';
import { closeBrackets, autocompletion, closeBracketsKeymap, completionKeymap } from '@codemirror/autocomplete';
import { highlightSelectionMatches, searchKeymap } from '@codemirror/search';
import type { SyntaxNode } from '@lezer/common';
Expand Down Expand Up @@ -134,10 +124,7 @@ export class View {
...defaultKeymap.filter((k) => k.key !== 'Mod-Enter'),
...searchKeymap,
...historyKeymap,
{ key: 'Ctrl-Shift-[', mac: 'Cmd-Shift-[', run: foldCode },
{ key: 'Ctrl-Shift-]', mac: 'Cmd-Shift-]', run: unfoldCode },
{ key: 'Ctrl-Alt-[', mac: 'Cmd-Alt-[', run: foldAll },
{ key: 'Ctrl-Alt-]', mac: 'Cmd-Alt-]', run: unfoldAll },
...foldKeymap,
...completionKeymap,
indentWithTab
]),
Expand Down

0 comments on commit d7c846c

Please sign in to comment.