pub fn text_editor(text: impl Into<Rope>) -> TextEditorExpand description
A text editor view built on top of Editor. This is the main editor view used in the
Lapce code editor. The default keymap includes the standard editing keys, for using your
own keymap use text_editor_keys.
§Default Keymaps
§Basic Editing
Up + ALT => Move Line Up Down + ALT => Move Line Down
Delete => Delete Forward Backspace => Delete Backward Backspace + Shift => Delete Forward
Home => Move to the start of the file End => Move to the end of the file
PageUp => Scroll up by a page PageDown => Scroll down by a page
PageUp + CTRL => Scroll up PageDown + CTRL => Scroll down
Enter => Insert New Line Tab => Insert Tab
Up + ALT, Up + SHIFT => Duplicate line up Down + ALT, Down + SHIFT => Duplicate line down
§Multi Cursor
i + ALT, i + SHIFT => Insert Cursor at the end of the line