mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
20 lines
348 B
TypeScript
20 lines
348 B
TypeScript
|
import { keymap } from '@codemirror/view'
|
||
|
import { foldAll, toggleFold, unfoldAll } from '@codemirror/language'
|
||
|
|
||
|
export function foldingKeymap() {
|
||
|
return keymap.of([
|
||
|
{
|
||
|
key: 'F2',
|
||
|
run: toggleFold,
|
||
|
},
|
||
|
{
|
||
|
key: 'Alt-Shift-1',
|
||
|
run: foldAll,
|
||
|
},
|
||
|
{
|
||
|
key: 'Alt-Shift-0',
|
||
|
run: unfoldAll,
|
||
|
},
|
||
|
])
|
||
|
}
|