Package-level declarations
Properties
Add a cursor on the line above each existing cursor head. Creates a new selection range at the vertically projected position, keeping all existing selections.
Add a cursor on the line below each existing cursor head.
Add a block comment around the selection.
Remove a block comment around the selection.
Key bindings for comment commands.
Copy the selected line(s) downward (duplicate below).
Copy the selected line(s) upward (duplicate above).
Move cursor one character backward (logical direction).
Move cursor one character backward by logical string index, using grapheme cluster breaks for boundary detection.
Move cursor one character forward (logical direction).
Move cursor one character forward by logical string index, using grapheme cluster breaks for boundary detection.
Move cursor one character to the left.
Move cursor one character to the right.
Move cursor to the end of the document.
Move cursor to the start of the document.
Move cursor one word group backward (logical direction).
Move cursor one word group forward (logical direction).
Move cursor to the start of the next word group (Windows convention). Unlike cursorGroupForward which stops at the end of the current group, this skips past trailing whitespace and stops at the beginning of the next word.
Move cursor one word group to the left.
Move cursor one word group to the right.
Move cursor to the line boundary in the backward direction.
Move cursor to the line boundary in the forward direction. In the absence of soft line wrapping, this is equivalent to cursorLineEnd.
Move cursor to the line boundary on the left side (visual direction). Same as cursorLineBoundaryBackward in left-to-right text.
Move cursor to the line boundary on the right side (visual direction). Same as cursorLineBoundaryForward in left-to-right text.
Move cursor one line down.
Move cursor to the end of the current line.
Move cursor to the start of the current line.
Move cursor one line up.
Move cursor to the matching bracket.
Move cursor one page down.
Move cursor one page up.
Move cursor one subword backward (camelCase-aware).
Move cursor one subword forward (camelCase-aware).
Move cursor to the nearest syntax boundary in the left direction. Tries bracket matching first; if no bracket match is found, walks the syntax tree to find the nearest enclosing node boundary.
Move cursor to the nearest syntax boundary in the right direction.
Extended keymap that adds line operations, indent commands, and more on top of standardKeymap.
Delete one character backward (Backspace).
Delete one character backward without indent-unit awareness.
Delete one character forward (Delete key).
Delete one word group backward.
Delete one word group forward.
Delete to the start of the next word group (Windows convention). Deletes through trailing whitespace to the beginning of the next word.
Delete the entire current line (including line break).
Delete to the line boundary in the backward direction. In the absence of soft line wrapping, this is equivalent to deleteToLineStart.
Delete to the line boundary in the forward direction. In the absence of soft line wrapping, this is equivalent to deleteToLineEnd.
Delete from cursor to the end of the line.
Delete from cursor to the start of the line.
Remove trailing whitespace from every line in the document.
Emacs-style key bindings.
Remove one level of indentation from each line in the selection.
Add one level of indentation to each line in the selection.
Key bindings that use Tab/Shift-Tab for indentation.
Insert an empty line below the current line.
Insert a newline.
Insert a newline and indent using language-aware indentation when available, falling back to copying leading whitespace.
Insert a newline and copy the leading whitespace from the current line without any smart indentation logic.
Insert a tab character or indent unit.
This annotation can be used on transactions to prevent them from being combined with other transactions in the undo history. Given "before", it'll prevent grouping with previous events. With "after", it prevents grouping with the next event. "full" does both.
Add line comments to selected lines.
Remove line comments from selected lines.
Move the selected line(s) down by one line.
Move the selected line(s) up by one line.
Insert a newline and auto-indent. This is an alias for insertNewlineAndIndent, exported as a separate name to match the upstream CodeMirror API.
Redo the last undone change.
Redo a change or selection change.
Select the entire document.
Extend selection one character backward (logical direction).
Extend selection one character backward by logical string index, using grapheme cluster breaks.
Extend selection one character forward (logical direction).
Extend selection one character forward by logical string index, using grapheme cluster breaks.
Extend selection one character to the left.
Extend selection one character to the right.
Extend selection to the end of the document.
Extend selection to the start of the document.
Extend selection one word group backward (logical direction).
Extend selection one word group forward (logical direction).
Extend selection to the start of the next word group (Windows convention).
Extend selection one word group to the left.
Extend selection one word group to the right.
Expand selection to cover full lines.
Extend selection to the line boundary in the backward direction.
Extend selection to the line boundary in the forward direction.
Extend selection to the line boundary on the left side (visual).
Extend selection to the line boundary on the right side (visual).
Extend selection one line down.
Extend selection to the end of the current line.
Extend selection to the start of the current line.
Extend selection one line up.
Extend selection to the matching bracket.
Select the next occurrence of the current selection text (Ctrl-D style).
Extend selection one page down.
Extend selection one page up.
Select the enclosing syntax node (parent) of the current selection. Repeatedly invoking expands the selection to larger and larger nodes.
Extend selection one subword backward (camelCase-aware).
Extend selection one subword forward (camelCase-aware).
Extend selection to the nearest syntax boundary on the left.
Extend selection to the nearest syntax boundary on the right.
Collapse each non-empty selection range to a cursor at its anchor.
Insert a newline, but keep the cursor before it (splits the line without moving cursor down).
Essential key bindings for basic editing: arrow keys, deletion, selection, Enter, and select-all.
Toggle block comments around the selection.
Toggle line comments on selected lines.
Swap the characters before and after the cursor.
Undo the last change.
Undo a change or selection change. Unlike undo, this will also restore selection-only changes (cursor movements) that occurred between edits, stepping through selection history.
Functions
Convenience function to create an extension from the defaultKeymap.
Convenience function to create an extension from the standardKeymap.