openeditorcode.devFIELD MANUAL / 0.2.43Español
editor.md DOCUMENTATION

06 — In the project

Editor and tabs

Editing, saving, external changes, clipboard and document lifecycle.

v0.2.43Source review ·
On this page

Work with multiple files

Opening another file synchronizes the current buffer and adds or reuses a tab by path without discarding edits. Shift+Tab cycles forward. Ctrl+W closes the active tab; closing the last focuses Explorer. Middle-click closes from anywhere on a tab while preserving dirty-file confirmation.

The tab bar supports multiple rows; × on an inactive tab first activates it. Tabs, cursor, scroll and unsaved work are not persistently restored after restarting.

Draggable scrollbars and mouse

Drag the vertical and horizontal scrollbars to move; Shift+wheel scrolls horizontally when line wrapping is off. Clickable controls show a hand pointer when the terminal supports OSC 22. Mouse controls complement the keyboard.

Edit and select

Ctrl+A selects the active file without modifying it, with source focused and outside searches or dialogs. Works with Vim and from the palette. Remap editor.selectAll in global keyboard.bindings. The current plugin also supports select-all.

The textarea provides movement, Shift selection, deletion and undo/redo. PageUp/PageDown pages; Alt+Shift+Down duplicates above and Alt+Shift+Up below. F7/F8 toggle panes, Ctrl+Shift+arrows moves focus and Tab cycles it. Home/End are document boundaries; Ctrl+E goes to line end. Super+A is the inherited select-all alias.

Save and resolve external changes

Ctrl+S saves tab content, including from preview, using an exclusive temporary and rename. It compares disk state; external changes allow reload, overwrite or cancel. Saving and reloading retain document identity across tab changes and do not discard newer edits during I/O. Delete, rename and Git discard are blocked for files with pending operations.

Retains CRLF when originally used, and POSIX permissions or Windows ACLs. Windows → WSL saves inside the distribution with Linux ownership, permissions and attributes; requires coreutils with no insecure fallback. F5 does not automatically reload the standalone document.

Pending changes on close or quit

Close checks the current tab; quit and update check all tabs. There are three choices: save and stay, save and continue, or continue without saving. Esc cancels. The initial selection is the third, without saving.

Saving from these confirmations does not pass through the same wrapper as Ctrl+S: it skips format on save and automatic transition to the external-conflict dialog. A failure keeps the confirmation open.

Clipboard

Ctrl+C requires a selection and copies via OSC 52, including text selected in the F12 log; Ctrl+C does not quit OEC. Ctrl+V uses Get-Clipboard -Raw on Windows or the first available executable among wl-paste, xclip and xsel on Linux. The helper removes one trailing newline from the returned text.

Paste sent directly by the terminal is also handled by OpenTUI. If copy fails, check OSC 52 support; if paste fails, check the system tool and focus on an editable view.

Line numbers and highlighting

Optional logical line numbers and a visual scrollbar. Highlighting is per-line regex, deferred 120 ms, and disabled above 200,000 characters. It recognizes .ts .tsx .js .jsx .json .css .html .svg .md .py .yml .yaml .sh. SVG highlights tags and attributes. Complete six-digit hex literals show their background color and contrasting text; three- or eight-digit literals are not painted.

There is no semantic analysis, LSP, code completion or integrated compiler diagnostics. Seven token colors and attributes are configured in editor.syntax.styles.

Chapter sources

Links pinned to the reviewed commit; they do not follow main.

Static documentation · ES / ENView coverage ↗