Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol diffdown.com
1import * as _codemirror_state from '@codemirror/state'; 2import { StateCommand, Facet, Transaction, StateEffect, Extension, StateField, EditorState } from '@codemirror/state'; 3import { KeyBinding, Command } from '@codemirror/view'; 4 5/** 6An object of this type can be provided as [language 7data](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt) under a `"commentTokens"` 8property to configure comment syntax for a language. 9*/ 10interface CommentTokens { 11 /** 12 The block comment syntax, if any. For example, for HTML 13 you'd provide `{open: "<!--", close: "-->"}`. 14 */ 15 block?: { 16 open: string; 17 close: string; 18 }; 19 /** 20 The line comment syntax. For example `"//"`. 21 */ 22 line?: string; 23} 24/** 25Comment or uncomment the current selection. Will use line comments 26if available, otherwise falling back to block comments. 27*/ 28declare const toggleComment: StateCommand; 29/** 30Comment or uncomment the current selection using line comments. 31The line comment syntax is taken from the 32[`commentTokens`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) [language 33data](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt). 34*/ 35declare const toggleLineComment: StateCommand; 36/** 37Comment the current selection using line comments. 38*/ 39declare const lineComment: StateCommand; 40/** 41Uncomment the current selection using line comments. 42*/ 43declare const lineUncomment: StateCommand; 44/** 45Comment or uncomment the current selection using block comments. 46The block comment syntax is taken from the 47[`commentTokens`](https://codemirror.net/6/docs/ref/#commands.CommentTokens) [language 48data](https://codemirror.net/6/docs/ref/#state.EditorState.languageDataAt). 49*/ 50declare const toggleBlockComment: StateCommand; 51/** 52Comment the current selection using block comments. 53*/ 54declare const blockComment: StateCommand; 55/** 56Uncomment the current selection using block comments. 57*/ 58declare const blockUncomment: StateCommand; 59/** 60Comment or uncomment the lines around the current selection using 61block comments. 62*/ 63declare const toggleBlockCommentByLine: StateCommand; 64 65/** 66Transaction annotation that will prevent that transaction from 67being combined with other transactions in the undo history. Given 68`"before"`, it'll prevent merging with previous transactions. With 69`"after"`, subsequent transactions won't be combined with this 70one. With `"full"`, the transaction is isolated on both sides. 71*/ 72declare const isolateHistory: _codemirror_state.AnnotationType<"after" | "before" | "full">; 73/** 74This facet provides a way to register functions that, given a 75transaction, provide a set of effects that the history should 76store when inverting the transaction. This can be used to 77integrate some kinds of effects in the history, so that they can 78be undone (and redone again). 79*/ 80declare const invertedEffects: Facet<(tr: Transaction) => readonly StateEffect<any>[], readonly ((tr: Transaction) => readonly StateEffect<any>[])[]>; 81interface HistoryConfig { 82 /** 83 The minimum depth (amount of events) to store. Defaults to 100. 84 */ 85 minDepth?: number; 86 /** 87 The maximum time (in milliseconds) that adjacent events can be 88 apart and still be grouped together. Defaults to 500. 89 */ 90 newGroupDelay?: number; 91 /** 92 By default, when close enough together in time, changes are 93 joined into an existing undo event if they touch any of the 94 changed ranges from that event. You can pass a custom predicate 95 here to influence that logic. 96 */ 97 joinToEvent?: (tr: Transaction, isAdjacent: boolean) => boolean; 98} 99/** 100Create a history extension with the given configuration. 101*/ 102declare function history(config?: HistoryConfig): Extension; 103/** 104The state field used to store the history data. Should probably 105only be used when you want to 106[serialize](https://codemirror.net/6/docs/ref/#state.EditorState.toJSON) or 107[deserialize](https://codemirror.net/6/docs/ref/#state.EditorState^fromJSON) state objects in a way 108that preserves history. 109*/ 110declare const historyField: StateField<unknown>; 111/** 112Undo a single group of history events. Returns false if no group 113was available. 114*/ 115declare const undo: StateCommand; 116/** 117Redo a group of history events. Returns false if no group was 118available. 119*/ 120declare const redo: StateCommand; 121/** 122Undo a change or selection change. 123*/ 124declare const undoSelection: StateCommand; 125/** 126Redo a change or selection change. 127*/ 128declare const redoSelection: StateCommand; 129/** 130The amount of undoable change events available in a given state. 131*/ 132declare const undoDepth: (state: EditorState) => number; 133/** 134The amount of redoable change events available in a given state. 135*/ 136declare const redoDepth: (state: EditorState) => number; 137/** 138Default key bindings for the undo history. 139 140- Mod-z: [`undo`](https://codemirror.net/6/docs/ref/#commands.undo). 141- Mod-y (Mod-Shift-z on macOS) + Ctrl-Shift-z on Linux: [`redo`](https://codemirror.net/6/docs/ref/#commands.redo). 142- Mod-u: [`undoSelection`](https://codemirror.net/6/docs/ref/#commands.undoSelection). 143- Alt-u (Mod-Shift-u on macOS): [`redoSelection`](https://codemirror.net/6/docs/ref/#commands.redoSelection). 144*/ 145declare const historyKeymap: readonly KeyBinding[]; 146 147/** 148Move the selection one character to the left (which is backward in 149left-to-right text, forward in right-to-left text). 150*/ 151declare const cursorCharLeft: Command; 152/** 153Move the selection one character to the right. 154*/ 155declare const cursorCharRight: Command; 156/** 157Move the selection one character forward. 158*/ 159declare const cursorCharForward: Command; 160/** 161Move the selection one character backward. 162*/ 163declare const cursorCharBackward: Command; 164/** 165Move the selection one character forward, in logical 166(non-text-direction-aware) string index order. 167*/ 168declare const cursorCharForwardLogical: StateCommand; 169/** 170Move the selection one character backward, in logical string index 171order. 172*/ 173declare const cursorCharBackwardLogical: StateCommand; 174/** 175Move the selection to the left across one group of word or 176non-word (but also non-space) characters. 177*/ 178declare const cursorGroupLeft: Command; 179/** 180Move the selection one group to the right. 181*/ 182declare const cursorGroupRight: Command; 183/** 184Move the selection one group forward. 185*/ 186declare const cursorGroupForward: Command; 187/** 188Move the selection one group backward. 189*/ 190declare const cursorGroupBackward: Command; 191/** 192Move the cursor one group forward in the default Windows style, 193where it moves to the start of the next group. 194*/ 195declare const cursorGroupForwardWin: Command; 196/** 197Move the selection one group or camel-case subword forward. 198*/ 199declare const cursorSubwordForward: Command; 200/** 201Move the selection one group or camel-case subword backward. 202*/ 203declare const cursorSubwordBackward: Command; 204/** 205Move the cursor over the next syntactic element to the left. 206*/ 207declare const cursorSyntaxLeft: Command; 208/** 209Move the cursor over the next syntactic element to the right. 210*/ 211declare const cursorSyntaxRight: Command; 212/** 213Move the selection one line up. 214*/ 215declare const cursorLineUp: Command; 216/** 217Move the selection one line down. 218*/ 219declare const cursorLineDown: Command; 220/** 221Move the selection one page up. 222*/ 223declare const cursorPageUp: Command; 224/** 225Move the selection one page down. 226*/ 227declare const cursorPageDown: Command; 228/** 229Move the selection to the next line wrap point, or to the end of 230the line if there isn't one left on this line. 231*/ 232declare const cursorLineBoundaryForward: Command; 233/** 234Move the selection to previous line wrap point, or failing that to 235the start of the line. If the line is indented, and the cursor 236isn't already at the end of the indentation, this will move to the 237end of the indentation instead of the start of the line. 238*/ 239declare const cursorLineBoundaryBackward: Command; 240/** 241Move the selection one line wrap point to the left. 242*/ 243declare const cursorLineBoundaryLeft: Command; 244/** 245Move the selection one line wrap point to the right. 246*/ 247declare const cursorLineBoundaryRight: Command; 248/** 249Move the selection to the start of the line. 250*/ 251declare const cursorLineStart: Command; 252/** 253Move the selection to the end of the line. 254*/ 255declare const cursorLineEnd: Command; 256/** 257Move the selection to the bracket matching the one it is currently 258on, if any. 259*/ 260declare const cursorMatchingBracket: StateCommand; 261/** 262Extend the selection to the bracket matching the one the selection 263head is currently on, if any. 264*/ 265declare const selectMatchingBracket: StateCommand; 266/** 267Move the selection head one character to the left, while leaving 268the anchor in place. 269*/ 270declare const selectCharLeft: Command; 271/** 272Move the selection head one character to the right. 273*/ 274declare const selectCharRight: Command; 275/** 276Move the selection head one character forward. 277*/ 278declare const selectCharForward: Command; 279/** 280Move the selection head one character backward. 281*/ 282declare const selectCharBackward: Command; 283/** 284Move the selection head one character forward by logical 285(non-direction aware) string index order. 286*/ 287declare const selectCharForwardLogical: StateCommand; 288/** 289Move the selection head one character backward by logical string 290index order. 291*/ 292declare const selectCharBackwardLogical: StateCommand; 293/** 294Move the selection head one [group](https://codemirror.net/6/docs/ref/#commands.cursorGroupLeft) to 295the left. 296*/ 297declare const selectGroupLeft: Command; 298/** 299Move the selection head one group to the right. 300*/ 301declare const selectGroupRight: Command; 302/** 303Move the selection head one group forward. 304*/ 305declare const selectGroupForward: Command; 306/** 307Move the selection head one group backward. 308*/ 309declare const selectGroupBackward: Command; 310/** 311Move the selection head one group forward in the default Windows 312style, skipping to the start of the next group. 313*/ 314declare const selectGroupForwardWin: Command; 315/** 316Move the selection head one group or camel-case subword forward. 317*/ 318declare const selectSubwordForward: Command; 319/** 320Move the selection head one group or subword backward. 321*/ 322declare const selectSubwordBackward: Command; 323/** 324Move the selection head over the next syntactic element to the left. 325*/ 326declare const selectSyntaxLeft: Command; 327/** 328Move the selection head over the next syntactic element to the right. 329*/ 330declare const selectSyntaxRight: Command; 331/** 332Move the selection head one line up. 333*/ 334declare const selectLineUp: Command; 335/** 336Move the selection head one line down. 337*/ 338declare const selectLineDown: Command; 339/** 340Move the selection head one page up. 341*/ 342declare const selectPageUp: Command; 343/** 344Move the selection head one page down. 345*/ 346declare const selectPageDown: Command; 347/** 348Move the selection head to the next line boundary. 349*/ 350declare const selectLineBoundaryForward: Command; 351/** 352Move the selection head to the previous line boundary. 353*/ 354declare const selectLineBoundaryBackward: Command; 355/** 356Move the selection head one line boundary to the left. 357*/ 358declare const selectLineBoundaryLeft: Command; 359/** 360Move the selection head one line boundary to the right. 361*/ 362declare const selectLineBoundaryRight: Command; 363/** 364Move the selection head to the start of the line. 365*/ 366declare const selectLineStart: Command; 367/** 368Move the selection head to the end of the line. 369*/ 370declare const selectLineEnd: Command; 371/** 372Move the selection to the start of the document. 373*/ 374declare const cursorDocStart: StateCommand; 375/** 376Move the selection to the end of the document. 377*/ 378declare const cursorDocEnd: StateCommand; 379/** 380Move the selection head to the start of the document. 381*/ 382declare const selectDocStart: StateCommand; 383/** 384Move the selection head to the end of the document. 385*/ 386declare const selectDocEnd: StateCommand; 387/** 388Select the entire document. 389*/ 390declare const selectAll: StateCommand; 391/** 392Expand the selection to cover entire lines. 393*/ 394declare const selectLine: StateCommand; 395/** 396Select the next syntactic construct that is larger than the 397selection. Note that this will only work insofar as the language 398[provider](https://codemirror.net/6/docs/ref/#language.language) you use builds up a full 399syntax tree. 400*/ 401declare const selectParentSyntax: StateCommand; 402/** 403Expand the selection by adding a cursor above the heads of 404currently selected ranges. 405*/ 406declare const addCursorAbove: Command; 407/** 408Expand the selection by adding a cursor below the heads of 409currently selected ranges. 410*/ 411declare const addCursorBelow: Command; 412/** 413Simplify the current selection. When multiple ranges are selected, 414reduce it to its main range. Otherwise, if the selection is 415non-empty, convert it to a cursor selection. 416*/ 417declare const simplifySelection: StateCommand; 418/** 419Delete the selection, or, for cursor selections, the character or 420indentation unit before the cursor. 421*/ 422declare const deleteCharBackward: Command; 423/** 424Delete the selection or the character before the cursor. Does not 425implement any extended behavior like deleting whole indentation 426units in one go. 427*/ 428declare const deleteCharBackwardStrict: Command; 429/** 430Delete the selection or the character after the cursor. 431*/ 432declare const deleteCharForward: Command; 433/** 434Delete the selection or backward until the end of the next 435[group](https://codemirror.net/6/docs/ref/#view.EditorView.moveByGroup), only skipping groups of 436whitespace when they consist of a single space. 437*/ 438declare const deleteGroupBackward: StateCommand; 439/** 440Delete the selection or forward until the end of the next group. 441*/ 442declare const deleteGroupForward: StateCommand; 443/** 444Variant of [`deleteGroupForward`](https://codemirror.net/6/docs/ref/#commands.deleteGroupForward) 445that uses the Windows convention of also deleting the whitespace 446after a word. 447*/ 448declare const deleteGroupForwardWin: Command; 449/** 450Delete the selection, or, if it is a cursor selection, delete to 451the end of the line. If the cursor is directly at the end of the 452line, delete the line break after it. 453*/ 454declare const deleteToLineEnd: Command; 455/** 456Delete the selection, or, if it is a cursor selection, delete to 457the start of the line. If the cursor is directly at the start of the 458line, delete the line break before it. 459*/ 460declare const deleteToLineStart: Command; 461/** 462Delete the selection, or, if it is a cursor selection, delete to 463the start of the line or the next line wrap before the cursor. 464*/ 465declare const deleteLineBoundaryBackward: Command; 466/** 467Delete the selection, or, if it is a cursor selection, delete to 468the end of the line or the next line wrap after the cursor. 469*/ 470declare const deleteLineBoundaryForward: Command; 471/** 472Delete all whitespace directly before a line end from the 473document. 474*/ 475declare const deleteTrailingWhitespace: StateCommand; 476/** 477Replace each selection range with a line break, leaving the cursor 478on the line before the break. 479*/ 480declare const splitLine: StateCommand; 481/** 482Flip the characters before and after the cursor(s). 483*/ 484declare const transposeChars: StateCommand; 485/** 486Move the selected lines up one line. 487*/ 488declare const moveLineUp: StateCommand; 489/** 490Move the selected lines down one line. 491*/ 492declare const moveLineDown: StateCommand; 493/** 494Create a copy of the selected lines. Keep the selection in the top copy. 495*/ 496declare const copyLineUp: StateCommand; 497/** 498Create a copy of the selected lines. Keep the selection in the bottom copy. 499*/ 500declare const copyLineDown: StateCommand; 501/** 502Delete selected lines. 503*/ 504declare const deleteLine: Command; 505/** 506Replace the selection with a newline. 507*/ 508declare const insertNewline: StateCommand; 509/** 510Replace the selection with a newline and the same amount of 511indentation as the line above. 512*/ 513declare const insertNewlineKeepIndent: StateCommand; 514/** 515Replace the selection with a newline and indent the newly created 516line(s). If the current line consists only of whitespace, this 517will also delete that whitespace. When the cursor is between 518matching brackets, an additional newline will be inserted after 519the cursor. 520*/ 521declare const insertNewlineAndIndent: StateCommand; 522/** 523Create a blank, indented line below the current line. 524*/ 525declare const insertBlankLine: StateCommand; 526/** 527Auto-indent the selected lines. This uses the [indentation service 528facet](https://codemirror.net/6/docs/ref/#language.indentService) as source for auto-indent 529information. 530*/ 531declare const indentSelection: StateCommand; 532/** 533Add a [unit](https://codemirror.net/6/docs/ref/#language.indentUnit) of indentation to all selected 534lines. 535*/ 536declare const indentMore: StateCommand; 537/** 538Remove a [unit](https://codemirror.net/6/docs/ref/#language.indentUnit) of indentation from all 539selected lines. 540*/ 541declare const indentLess: StateCommand; 542/** 543Enables or disables 544[tab-focus mode](https://codemirror.net/6/docs/ref/#view.EditorView.setTabFocusMode). While on, this 545prevents the editor's key bindings from capturing Tab or 546Shift-Tab, making it possible for the user to move focus out of 547the editor with the keyboard. 548*/ 549declare const toggleTabFocusMode: Command; 550/** 551Temporarily enables [tab-focus 552mode](https://codemirror.net/6/docs/ref/#view.EditorView.setTabFocusMode) for two seconds or until 553another key is pressed. 554*/ 555declare const temporarilySetTabFocusMode: Command; 556/** 557Insert a tab character at the cursor or, if something is selected, 558use [`indentMore`](https://codemirror.net/6/docs/ref/#commands.indentMore) to indent the entire 559selection. 560*/ 561declare const insertTab: StateCommand; 562/** 563Array of key bindings containing the Emacs-style bindings that are 564available on macOS by default. 565 566 - Ctrl-b: [`cursorCharLeft`](https://codemirror.net/6/docs/ref/#commands.cursorCharLeft) ([`selectCharLeft`](https://codemirror.net/6/docs/ref/#commands.selectCharLeft) with Shift) 567 - Ctrl-f: [`cursorCharRight`](https://codemirror.net/6/docs/ref/#commands.cursorCharRight) ([`selectCharRight`](https://codemirror.net/6/docs/ref/#commands.selectCharRight) with Shift) 568 - Ctrl-p: [`cursorLineUp`](https://codemirror.net/6/docs/ref/#commands.cursorLineUp) ([`selectLineUp`](https://codemirror.net/6/docs/ref/#commands.selectLineUp) with Shift) 569 - Ctrl-n: [`cursorLineDown`](https://codemirror.net/6/docs/ref/#commands.cursorLineDown) ([`selectLineDown`](https://codemirror.net/6/docs/ref/#commands.selectLineDown) with Shift) 570 - Ctrl-a: [`cursorLineStart`](https://codemirror.net/6/docs/ref/#commands.cursorLineStart) ([`selectLineStart`](https://codemirror.net/6/docs/ref/#commands.selectLineStart) with Shift) 571 - Ctrl-e: [`cursorLineEnd`](https://codemirror.net/6/docs/ref/#commands.cursorLineEnd) ([`selectLineEnd`](https://codemirror.net/6/docs/ref/#commands.selectLineEnd) with Shift) 572 - Ctrl-d: [`deleteCharForward`](https://codemirror.net/6/docs/ref/#commands.deleteCharForward) 573 - Ctrl-h: [`deleteCharBackward`](https://codemirror.net/6/docs/ref/#commands.deleteCharBackward) 574 - Ctrl-k: [`deleteToLineEnd`](https://codemirror.net/6/docs/ref/#commands.deleteToLineEnd) 575 - Ctrl-Alt-h: [`deleteGroupBackward`](https://codemirror.net/6/docs/ref/#commands.deleteGroupBackward) 576 - Ctrl-o: [`splitLine`](https://codemirror.net/6/docs/ref/#commands.splitLine) 577 - Ctrl-t: [`transposeChars`](https://codemirror.net/6/docs/ref/#commands.transposeChars) 578 - Ctrl-v: [`cursorPageDown`](https://codemirror.net/6/docs/ref/#commands.cursorPageDown) 579 - Alt-v: [`cursorPageUp`](https://codemirror.net/6/docs/ref/#commands.cursorPageUp) 580*/ 581declare const emacsStyleKeymap: readonly KeyBinding[]; 582/** 583An array of key bindings closely sticking to platform-standard or 584widely used bindings. (This includes the bindings from 585[`emacsStyleKeymap`](https://codemirror.net/6/docs/ref/#commands.emacsStyleKeymap), with their `key` 586property changed to `mac`.) 587 588 - ArrowLeft: [`cursorCharLeft`](https://codemirror.net/6/docs/ref/#commands.cursorCharLeft) ([`selectCharLeft`](https://codemirror.net/6/docs/ref/#commands.selectCharLeft) with Shift) 589 - ArrowRight: [`cursorCharRight`](https://codemirror.net/6/docs/ref/#commands.cursorCharRight) ([`selectCharRight`](https://codemirror.net/6/docs/ref/#commands.selectCharRight) with Shift) 590 - Ctrl-ArrowLeft (Alt-ArrowLeft on macOS): [`cursorGroupLeft`](https://codemirror.net/6/docs/ref/#commands.cursorGroupLeft) ([`selectGroupLeft`](https://codemirror.net/6/docs/ref/#commands.selectGroupLeft) with Shift) 591 - Ctrl-ArrowRight (Alt-ArrowRight on macOS): [`cursorGroupRight`](https://codemirror.net/6/docs/ref/#commands.cursorGroupRight) ([`selectGroupRight`](https://codemirror.net/6/docs/ref/#commands.selectGroupRight) with Shift) 592 - Cmd-ArrowLeft (on macOS): [`cursorLineStart`](https://codemirror.net/6/docs/ref/#commands.cursorLineStart) ([`selectLineStart`](https://codemirror.net/6/docs/ref/#commands.selectLineStart) with Shift) 593 - Cmd-ArrowRight (on macOS): [`cursorLineEnd`](https://codemirror.net/6/docs/ref/#commands.cursorLineEnd) ([`selectLineEnd`](https://codemirror.net/6/docs/ref/#commands.selectLineEnd) with Shift) 594 - ArrowUp: [`cursorLineUp`](https://codemirror.net/6/docs/ref/#commands.cursorLineUp) ([`selectLineUp`](https://codemirror.net/6/docs/ref/#commands.selectLineUp) with Shift) 595 - ArrowDown: [`cursorLineDown`](https://codemirror.net/6/docs/ref/#commands.cursorLineDown) ([`selectLineDown`](https://codemirror.net/6/docs/ref/#commands.selectLineDown) with Shift) 596 - Cmd-ArrowUp (on macOS): [`cursorDocStart`](https://codemirror.net/6/docs/ref/#commands.cursorDocStart) ([`selectDocStart`](https://codemirror.net/6/docs/ref/#commands.selectDocStart) with Shift) 597 - Cmd-ArrowDown (on macOS): [`cursorDocEnd`](https://codemirror.net/6/docs/ref/#commands.cursorDocEnd) ([`selectDocEnd`](https://codemirror.net/6/docs/ref/#commands.selectDocEnd) with Shift) 598 - Ctrl-ArrowUp (on macOS): [`cursorPageUp`](https://codemirror.net/6/docs/ref/#commands.cursorPageUp) ([`selectPageUp`](https://codemirror.net/6/docs/ref/#commands.selectPageUp) with Shift) 599 - Ctrl-ArrowDown (on macOS): [`cursorPageDown`](https://codemirror.net/6/docs/ref/#commands.cursorPageDown) ([`selectPageDown`](https://codemirror.net/6/docs/ref/#commands.selectPageDown) with Shift) 600 - PageUp: [`cursorPageUp`](https://codemirror.net/6/docs/ref/#commands.cursorPageUp) ([`selectPageUp`](https://codemirror.net/6/docs/ref/#commands.selectPageUp) with Shift) 601 - PageDown: [`cursorPageDown`](https://codemirror.net/6/docs/ref/#commands.cursorPageDown) ([`selectPageDown`](https://codemirror.net/6/docs/ref/#commands.selectPageDown) with Shift) 602 - Home: [`cursorLineBoundaryBackward`](https://codemirror.net/6/docs/ref/#commands.cursorLineBoundaryBackward) ([`selectLineBoundaryBackward`](https://codemirror.net/6/docs/ref/#commands.selectLineBoundaryBackward) with Shift) 603 - End: [`cursorLineBoundaryForward`](https://codemirror.net/6/docs/ref/#commands.cursorLineBoundaryForward) ([`selectLineBoundaryForward`](https://codemirror.net/6/docs/ref/#commands.selectLineBoundaryForward) with Shift) 604 - Ctrl-Home (Cmd-Home on macOS): [`cursorDocStart`](https://codemirror.net/6/docs/ref/#commands.cursorDocStart) ([`selectDocStart`](https://codemirror.net/6/docs/ref/#commands.selectDocStart) with Shift) 605 - Ctrl-End (Cmd-Home on macOS): [`cursorDocEnd`](https://codemirror.net/6/docs/ref/#commands.cursorDocEnd) ([`selectDocEnd`](https://codemirror.net/6/docs/ref/#commands.selectDocEnd) with Shift) 606 - Enter and Shift-Enter: [`insertNewlineAndIndent`](https://codemirror.net/6/docs/ref/#commands.insertNewlineAndIndent) 607 - Ctrl-a (Cmd-a on macOS): [`selectAll`](https://codemirror.net/6/docs/ref/#commands.selectAll) 608 - Backspace: [`deleteCharBackward`](https://codemirror.net/6/docs/ref/#commands.deleteCharBackward) 609 - Delete: [`deleteCharForward`](https://codemirror.net/6/docs/ref/#commands.deleteCharForward) 610 - Ctrl-Backspace (Alt-Backspace on macOS): [`deleteGroupBackward`](https://codemirror.net/6/docs/ref/#commands.deleteGroupBackward) 611 - Ctrl-Delete (Alt-Delete on macOS): [`deleteGroupForward`](https://codemirror.net/6/docs/ref/#commands.deleteGroupForward) 612 - Cmd-Backspace (macOS): [`deleteLineBoundaryBackward`](https://codemirror.net/6/docs/ref/#commands.deleteLineBoundaryBackward). 613 - Cmd-Delete (macOS): [`deleteLineBoundaryForward`](https://codemirror.net/6/docs/ref/#commands.deleteLineBoundaryForward). 614*/ 615declare const standardKeymap: readonly KeyBinding[]; 616/** 617The default keymap. Includes all bindings from 618[`standardKeymap`](https://codemirror.net/6/docs/ref/#commands.standardKeymap) plus the following: 619 620- Alt-ArrowLeft (Ctrl-ArrowLeft on macOS): [`cursorSyntaxLeft`](https://codemirror.net/6/docs/ref/#commands.cursorSyntaxLeft) ([`selectSyntaxLeft`](https://codemirror.net/6/docs/ref/#commands.selectSyntaxLeft) with Shift) 621- Alt-ArrowRight (Ctrl-ArrowRight on macOS): [`cursorSyntaxRight`](https://codemirror.net/6/docs/ref/#commands.cursorSyntaxRight) ([`selectSyntaxRight`](https://codemirror.net/6/docs/ref/#commands.selectSyntaxRight) with Shift) 622- Alt-ArrowUp: [`moveLineUp`](https://codemirror.net/6/docs/ref/#commands.moveLineUp) 623- Alt-ArrowDown: [`moveLineDown`](https://codemirror.net/6/docs/ref/#commands.moveLineDown) 624- Shift-Alt-ArrowUp: [`copyLineUp`](https://codemirror.net/6/docs/ref/#commands.copyLineUp) 625- Shift-Alt-ArrowDown: [`copyLineDown`](https://codemirror.net/6/docs/ref/#commands.copyLineDown) 626- Ctrl-Alt-ArrowUp (Cmd-Alt-ArrowUp on macOS): [`addCursorAbove`](https://codemirror.net/6/docs/ref/#commands.addCursorAbove). 627- Ctrl-Alt-ArrowDown (Cmd-Alt-ArrowDown on macOS): [`addCursorBelow`](https://codemirror.net/6/docs/ref/#commands.addCursorBelow). 628- Escape: [`simplifySelection`](https://codemirror.net/6/docs/ref/#commands.simplifySelection) 629- Ctrl-Enter (Cmd-Enter on macOS): [`insertBlankLine`](https://codemirror.net/6/docs/ref/#commands.insertBlankLine) 630- Alt-l (Ctrl-l on macOS): [`selectLine`](https://codemirror.net/6/docs/ref/#commands.selectLine) 631- Ctrl-i (Cmd-i on macOS): [`selectParentSyntax`](https://codemirror.net/6/docs/ref/#commands.selectParentSyntax) 632- Ctrl-[ (Cmd-[ on macOS): [`indentLess`](https://codemirror.net/6/docs/ref/#commands.indentLess) 633- Ctrl-] (Cmd-] on macOS): [`indentMore`](https://codemirror.net/6/docs/ref/#commands.indentMore) 634- Ctrl-Alt-\\ (Cmd-Alt-\\ on macOS): [`indentSelection`](https://codemirror.net/6/docs/ref/#commands.indentSelection) 635- Shift-Ctrl-k (Shift-Cmd-k on macOS): [`deleteLine`](https://codemirror.net/6/docs/ref/#commands.deleteLine) 636- Shift-Ctrl-\\ (Shift-Cmd-\\ on macOS): [`cursorMatchingBracket`](https://codemirror.net/6/docs/ref/#commands.cursorMatchingBracket) 637- Ctrl-/ (Cmd-/ on macOS): [`toggleComment`](https://codemirror.net/6/docs/ref/#commands.toggleComment). 638- Shift-Alt-a: [`toggleBlockComment`](https://codemirror.net/6/docs/ref/#commands.toggleBlockComment). 639- Ctrl-m (Alt-Shift-m on macOS): [`toggleTabFocusMode`](https://codemirror.net/6/docs/ref/#commands.toggleTabFocusMode). 640*/ 641declare const defaultKeymap: readonly KeyBinding[]; 642/** 643A binding that binds Tab to [`indentMore`](https://codemirror.net/6/docs/ref/#commands.indentMore) and 644Shift-Tab to [`indentLess`](https://codemirror.net/6/docs/ref/#commands.indentLess). 645Please see the [Tab example](../../examples/tab/) before using 646this. 647*/ 648declare const indentWithTab: KeyBinding; 649 650export { type CommentTokens, addCursorAbove, addCursorBelow, blockComment, blockUncomment, copyLineDown, copyLineUp, cursorCharBackward, cursorCharBackwardLogical, cursorCharForward, cursorCharForwardLogical, cursorCharLeft, cursorCharRight, cursorDocEnd, cursorDocStart, cursorGroupBackward, cursorGroupForward, cursorGroupForwardWin, cursorGroupLeft, cursorGroupRight, cursorLineBoundaryBackward, cursorLineBoundaryForward, cursorLineBoundaryLeft, cursorLineBoundaryRight, cursorLineDown, cursorLineEnd, cursorLineStart, cursorLineUp, cursorMatchingBracket, cursorPageDown, cursorPageUp, cursorSubwordBackward, cursorSubwordForward, cursorSyntaxLeft, cursorSyntaxRight, defaultKeymap, deleteCharBackward, deleteCharBackwardStrict, deleteCharForward, deleteGroupBackward, deleteGroupForward, deleteGroupForwardWin, deleteLine, deleteLineBoundaryBackward, deleteLineBoundaryForward, deleteToLineEnd, deleteToLineStart, deleteTrailingWhitespace, emacsStyleKeymap, history, historyField, historyKeymap, indentLess, indentMore, indentSelection, indentWithTab, insertBlankLine, insertNewline, insertNewlineAndIndent, insertNewlineKeepIndent, insertTab, invertedEffects, isolateHistory, lineComment, lineUncomment, moveLineDown, moveLineUp, redo, redoDepth, redoSelection, selectAll, selectCharBackward, selectCharBackwardLogical, selectCharForward, selectCharForwardLogical, selectCharLeft, selectCharRight, selectDocEnd, selectDocStart, selectGroupBackward, selectGroupForward, selectGroupForwardWin, selectGroupLeft, selectGroupRight, selectLine, selectLineBoundaryBackward, selectLineBoundaryForward, selectLineBoundaryLeft, selectLineBoundaryRight, selectLineDown, selectLineEnd, selectLineStart, selectLineUp, selectMatchingBracket, selectPageDown, selectPageUp, selectParentSyntax, selectSubwordBackward, selectSubwordForward, selectSyntaxLeft, selectSyntaxRight, simplifySelection, splitLine, standardKeymap, temporarilySetTabFocusMode, toggleBlockComment, toggleBlockCommentByLine, toggleComment, toggleLineComment, toggleTabFocusMode, transposeChars, undo, undoDepth, undoSelection };