Expand all

CodeMirrorGotoLine

Custom goto line panel for CodeMirror using CSS-only Codex components.

Using the Alt-g keybinding, this shows a panel asking the user for a line number, when a valid position is provided, moves the cursor to that line.

This feature supports line numbers, relative line offsets prefixed with + or -, document percentages suffixed with %, and an optional column position by adding : and a second number after the line number.

Based on the CodeMirror implementation (MIT).

Properties

extension :Extension #

Get the panel and any associated keymaps as an Extension. For use only during CodeMirror initialization.

Type:

Overrides:
Source:
Get the panel and any associated keymaps as an Extension.

panel :Panel #

Get the Panel object.

Type:

Overrides:
Source:
Get the Panel object.

panelStateField :StateField #

Methods

go() #

Go to the specified line.

Source:
Go to the specified line.

onKeydown(event) #

Respond to keydown events.

Parameters:

Name Type Description
event KeyboardEvent
Source:
Respond to keydown events.

run() → {boolean} #

Open the go-to line panel.

Source:

Returns:

Type
boolean
Open the go-to line panel.