Skip to content

Read and Customize the Editor

By the end of this chapter, you will have selected a theme, changed logical line numbers, read pane status and recovered a Save outcome from feedback history. These choices leave your file's text unchanged.

Start with Explicit Choices

Create a small file:

printf 'first marker\nsecond marker\nthird marker\n' > presentation.txt

Save this trusted configuration as presentation.rb beside it:

Rur.select_theme('warm-light')
Rur.select_presentation_profile('compact')

The theme supplies colors and emphasis. The presentation profile controls the shape and fallback of contextual detail and notifications. It is separate from the interaction profile, which selects editing commands and states. Ruby configuration is trusted executable source; load only source you trust.

From the repository root, with both files there, start:

env -u RUBYOPT -u RUBYLIB -u GEM_HOME -u GEM_PATH cargo run --locked -p rur-editor --bin rur-terminal-proof -- --profile nonmodal --config presentation.rb presentation.txt

You can repeat with --profile modal. Alt-x opens command entry in both profiles. Enter a command name and press Enter; commands that need an argument open a second prompt. Ctrl-G cancels a prompt or closes inspection. No step below requires entering Insert or changing text.

Without a positional file, Rur opens a centered themed startup component with a uniform canvas background and four real actions. Open... is selected; arrows choose another action and Enter confirms it. The Unicode Rur emblem appears beside the actions when at least 96 columns and 23 rows are available. Smaller terminals keep the compact menu with a Rur title and remove the emblem before hiding actions. The emblem follows the current theme and is included in the executable. Eight columns separate it from the action column; the selection highlight stays within that action column. A positional file bypasses startup. Factory Dark uses the Tokyo Night Dark palette; Terminal Default remains an independent choice.

Rust files opened with a lowercase .rs suffix and Ruby files opened with .rb show syntax colors. In Dark, keywords such as fn and def are blue, while // and # comments use a quieter color. Syntax follows edits, undo and redo. Current search matches and active regions retain their highlighting. Plain notes keep ordinary text styling. Syntax analysis starts no language server; incomplete source remains editable.

Ctrl-X shows the pending C-x … sequence until it completes or Ctrl-G cancels. Alt-x filters the complete command catalog into aligned names, actual contextual shortcuts and concise descriptions. Unbound commands have an empty shortcut cell, and unavailable commands keep a visible cue. Move the highlighted row with arrows; confirmation rechecks the current command. Help's context page and explicit command/binding inspection retain full detail.

Select a Theme

Invoke describe-theme. The page names warm-light, its provider and provenance, and its style roles. Close it with Ctrl-G. Invoke select-theme, enter muted-light at the argument prompt, and confirm. Reopen describe-theme to check the selected identity.

The other factory choices are dark, bright-light, warm-light and terminal-default. Terminal Default uses the terminal's defaults independently of Dark. Declared RGB, 256-color, 16-color and monochrome terminals use compatible output; selection and rejected input also have attribute cues. Invoke restore-theme to select Dark again.

Read Numbers and Status

Invoke move-down to move to the second logical line. Invoke set-line-numbers, enter hybrid, and confirm. The current line shows its absolute number, 2; other lines show their distance from it. absolute, relative and none are also accepted. cycle-line-numbers cycles Absolute, Relative, Hybrid and None. The mode belongs to this view, so two panes showing one buffer can differ.

Numbers count logical lines, including lines containing tabs or wide characters. They are gutter content and are excluded from text selection and copying. Narrow panes compact or hide gutter lanes while preserving a text cell.

Each text pane has a thin separator and status row. Useful left/right groups show buffer identity, modified/read-only state, position, size, progress and interaction state. Active and inactive panes have distinct backgrounds. Relative identity replaces a permanent full-path dump; warnings survive narrow layout. Invoke inspect-status to read the first segment's full value. Repeat it to advance through segments and long values. Ctrl-G closes inspection. Save warnings remain visible when secondary context must contract.

Choose How Detail Appears

Invoke describe-presentation-profile and check compact, then close it. Invoke select-presentation-profile, enter plain, and confirm. Reopen the description to check the new identity. The factory choices are factory, compact, plain and status.

Search results and trusted providers can supply gutter markers. A collision symbol can represent several members. With a current marker, invoke inspect-gutter-marker to read its title, detail and provider. Repeating the command advances through members or narrow pages. Detail stays near its checked source when space permits and falls back to a status page when necessary. Ctrl-G dismisses it. An absent marker is reported explicitly; changed or closed sources invalidate old detail. invoke-gutter-marker-action rechecks the source and ordinary command before running an available action.

Recover Feedback After a Save

Save with Ctrl-X Ctrl-S and wait for saved durably. Invoke show-feedback-history, type source:file-owner, and press Enter to inspect the selected Save record. The record describes the real file outcome; reading it does not save again. Ctrl-G returns to the file.

Ordinary compact information expires after five seconds. Warnings and errors can draw attention without taking input from command candidates. Retained history remains readable after a display closes. dismiss-feedback changes active display eligibility; clear-feedback-history removes retained history. Neither cancels work or changes file-owner outcomes.

For an optional operation, invoke begin-snapshot-job, then show-progress. The digest may finish before you open the page on a small file; its outcome is then in feedback history. A running record reports actual processed bytes. cancel-progress requires a current token supplied by a native operation observation; a displayed label or old row is insufficient, and an already completed operation refuses cancellation. Ctrl-G closes inspection and retains its established pending-job result-discard behavior. See the presentation reference for retention and fallback rules.

Keep or Restore Your Choices

Session commands do not rewrite presentation.rb. Reloading unchanged source preserves current presentation choices; changed declarations replace the choices they explicitly supply. A rejected or cancelled replacement keeps the confirmed configuration. Restarting with the original file selects Warm Light and Compact again.

Exit with Ctrl-X Ctrl-C and verify:

cat presentation.txt

The three original lines remain unchanged. Use the presentation reference for available roles, finite limits and the distinction between active feedback, history and progress.

Try an Inherited Palette

The trusted visual review example inherits all 42 roles from factory Dark and changes only selection/accent colors and the status identity foreground/emphasis. Copy it to a separate local file:

cp examples/terminal-visual-review.rb visual-review.rb
env -u RUBYOPT -u RUBYLIB -u GEM_HOME -u GEM_PATH cargo run --locked -p rur-editor --bin rur-terminal-proof -- --profile nonmodal --config visual-review.rb presentation.txt

describe-theme identifies visual-review / Visual Review. Edit a palette value such as selection #314159, then use reload-configuration. A malformed or unknown value rejects the replacement and preserves the confirmed theme and input. restore-theme selects factory Dark. Session commands do not rewrite the trusted configuration; both interaction profiles use the same checked palette. The reference lists the accepted fields and attribute masks.

For stable geometry, ordinary changes update only damaged content and status; idle or equal fresh observations are silent. Declared synchronized output can bracket complete redraws, while unknown support uses ordinary bounded output. Follow Prepare and Review a Visual Preview for the gated executable, support declaration, comparable captures and separate maintainer appearance review.

Previous: Interface | Part | User Guide | Next: Customization