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

06 — In the project

Editor and tabs

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

v0.2.41Source review ·
On this page

Work with multiple files

Opening another file synchronizes the current buffer and adds or reuses a tab by path; it does not ask to discard previous edits. Shift+Tab cycles forward. Ctrl+W closes the active tab; closing the last clears the editor and focuses Explorer.

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

Edit and select

Ctrl+A selects the entire active file without modifying it, with source editor focus and outside searches or dialogs. It also works with the Vim profile and appears in the palette as Select all file contents. Remap editor.selectAll in global keyboard.bindings. Plugin 0.1.2 provides the same action in its editor.

The textarea provides movement, Shift selection, deletion and undo/redo. PageUp/PageDown moves one visual page. Alt+Shift+Down duplicates above and Alt+Shift+Up below. OEC reserves Ctrl+B, Ctrl+F, Ctrl+W and Ctrl+Shift+arrows; Tab switches focus. Home/End are document boundaries; Ctrl+E goes to line end. Super+A remains an inherited select-all binding if delivered by the terminal.

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 ↗