index.d.ts 24 KB

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