diff options
| author | rottedfm <rottedfm@proton.me> | 2026-08-19 11:24:55 -0400 |
|---|---|---|
| committer | rottedfm <rottedfm@proton.me> | 2026-08-19 11:24:55 -0400 |
| commit | 8e16347b0eb329e84892af8ece36886324c95f62 (patch) | |
| tree | be1267972b5de2f1ae592577dfabce67f1fe6e87 /.config | |
| parent | c6ae4660d1cc2414b22c492c5e819d009c8187c2 (diff) | |
| parent | ea0bd36167b684c0accdb5ce2b2e21b8d84aeb25 (diff) | |
Establishes the first working baseline: moji <file> opens a file into a
ropey rope and edits it with Helix selection-first modal editing, under a
DO-178C DAL-C requirements and traceability process.
Prior to this, main tracked four files and src/main.rs was still
println!("Hello, world!") — there was no buildable state to build on.
Verified on a fresh clone of the branch with no untracked files:
cargo build; clippy --all-targets -D warnings clean; 294 tests passing;
scripts/check-trace.sh reports 98/98 requirements traced in both
directions.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to '.config')
| -rw-r--r-- | .config/config.toml | 151 |
1 files changed, 151 insertions, 0 deletions
diff --git a/.config/config.toml b/.config/config.toml new file mode 100644 index 0000000..8520772 --- /dev/null +++ b/.config/config.toml @@ -0,0 +1,151 @@ +# mojibake configuration. +# +# This file is both the runtime configuration and, via `include_str!` in +# src/config.rs, the compiled-in default set. User settings in +# $MOJIBAKE_CONFIG/config.toml override these per individual binding; +# anything not listed here keeps its default. (MJB-LLR-180, MJB-LLR-182) +# +# Key syntax: "<k>" for one key, "<g><g>" for a sequence, with the modifier +# prefixes ctrl-, alt-, shift-, e.g. "<ctrl-d>". +# +# Bindings follow the Helix default keymap: https://docs.helix-editor.com/keymap.html + +# Editor settings live in their own table rather than at top level: the +# top-level struct uses `#[serde(flatten)]` for the data/config directories, +# and config-rs stringifies values it buffers through a flattened map, which +# breaks integer and boolean fields. (MJB-LLR-185) +[editor] +# Lines of context kept between the cursor and the viewport edge. +# Clamped to half the viewport height at use. (MJB-LLR-093) +scrolloff = 5 + +# Append a trailing newline on write when the buffer lacks one. +insert_final_newline = true + +# Consulted by App before any component sees the key. A match here is consumed +# and never reaches the buffer, so these fire in every mode. (MJB-LLR-203) +[keybindings.global] +"<ctrl-c>" = "Quit" +"<ctrl-z>" = "Suspend" + +[keybindings.normal] +# Movement (MJB-HLR-006) +"<h>" = "MoveCharLeft" +"<j>" = "MoveLineDown" +"<k>" = "MoveLineUp" +"<l>" = "MoveCharRight" +"<left>" = "MoveCharLeft" +"<down>" = "MoveLineDown" +"<up>" = "MoveLineUp" +"<right>" = "MoveCharRight" + +# Word motions. These leave a SELECTION, not a bare cursor. (MJB-HLR-007) +"<w>" = "MoveNextWordStart" +"<b>" = "MovePrevWordStart" +"<e>" = "MoveNextWordEnd" +"<W>" = "MoveNextLongWordStart" +"<B>" = "MovePrevLongWordStart" +"<E>" = "MoveNextLongWordEnd" + +# Goto mode (MJB-HLR-008) +"<g><g>" = "GotoFileStart" +"<g><e>" = "GotoLastLine" +"<g><h>" = "GotoLineStart" +"<g><l>" = "GotoLineEnd" +"<g><s>" = "GotoFirstNonWhitespace" + +# Selection manipulation +"<x>" = "ExtendLineBelow" +"<;>" = "CollapseSelection" +"<alt-;>" = "FlipSelections" +"<%>" = "SelectAll" +"<v>" = "SelectMode" + +# Entering insert mode (MJB-HLR-009) +"<i>" = "InsertMode" +"<a>" = "AppendMode" +"<I>" = "InsertAtLineStart" +"<A>" = "InsertAtLineEnd" +"<o>" = "OpenBelow" +"<O>" = "OpenAbove" + +# Modification (MJB-HLR-010) +"<d>" = "DeleteSelection" +"<c>" = "ChangeSelection" + +# Undo / redo (MJB-HLR-011) +"<u>" = "Undo" +"<U>" = "Redo" + +# Scrolling and paging (MJB-HLR-013) +"<ctrl-u>" = "PageCursorHalfUp" +"<ctrl-d>" = "PageCursorHalfDown" +"<ctrl-b>" = "PageUp" +"<ctrl-f>" = "PageDown" +"<pageup>" = "PageUp" +"<pagedown>" = "PageDown" + +# Command mode (MJB-HLR-016) +"<:>" = "CommandMode" + +[keybindings.select] +# Select mode repeats normal-mode motions, but extends rather than replaces. +"<h>" = "ExtendCharLeft" +"<j>" = "ExtendLineDown" +"<k>" = "ExtendLineUp" +"<l>" = "ExtendCharRight" +"<w>" = "ExtendNextWordStart" +"<b>" = "ExtendPrevWordStart" +"<e>" = "ExtendNextWordEnd" +"<esc>" = "NormalMode" +"<v>" = "NormalMode" +"<d>" = "DeleteSelection" +"<c>" = "ChangeSelection" +"<;>" = "CollapseSelection" + +[keybindings.insert] +# Any printable key not bound here self-inserts; that fallback is not +# expressible as a table entry. (MJB-LLR-156) +"<esc>" = "NormalMode" +"<enter>" = "InsertNewline" +"<backspace>" = "DeleteCharBackward" +"<delete>" = "DeleteCharForward" +"<tab>" = "InsertTab" +"<ctrl-h>" = "DeleteCharBackward" +"<ctrl-d>" = "DeleteCharForward" +"<ctrl-w>" = "DeleteWordBackward" +"<ctrl-u>" = "KillToLineStart" +"<left>" = "MoveCharLeft" +"<down>" = "MoveLineDown" +"<up>" = "MoveLineUp" +"<right>" = "MoveCharRight" + +[keybindings.command] +# Command mode routes keys to a line editor; only these are bound. (MJB-LLR-158) +"<esc>" = "NormalMode" +"<enter>" = "CommandSubmit" +"<backspace>" = "CommandBackspace" + +[styles.normal] +cursor = "black on white" +selection = "on blue" +linenr = "gray8" +statusline = "black on cyan" + +[styles.insert] +cursor = "black on green" +selection = "on blue" +linenr = "gray8" +statusline = "black on green" + +[styles.select] +cursor = "black on white" +selection = "on magenta" +linenr = "gray8" +statusline = "black on magenta" + +[styles.command] +cursor = "black on white" +selection = "on blue" +linenr = "gray8" +statusline = "black on yellow" |
