# 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: "" for one key, "" for a sequence, with the modifier # prefixes ctrl-, alt-, shift-, e.g. "". # # 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] "" = "Quit" "" = "Suspend" [keybindings.normal] # Movement (MJB-HLR-006) "" = "MoveCharLeft" "" = "MoveLineDown" "" = "MoveLineUp" "" = "MoveCharRight" "" = "MoveCharLeft" "" = "MoveLineDown" "" = "MoveLineUp" "" = "MoveCharRight" # Word motions. These leave a SELECTION, not a bare cursor. (MJB-HLR-007) "" = "MoveNextWordStart" "" = "MovePrevWordStart" "" = "MoveNextWordEnd" "" = "MoveNextLongWordStart" "" = "MovePrevLongWordStart" "" = "MoveNextLongWordEnd" # Goto mode (MJB-HLR-008) "" = "GotoFileStart" "" = "GotoLastLine" "" = "GotoLineStart" "" = "GotoLineEnd" "" = "GotoFirstNonWhitespace" # Selection manipulation "" = "ExtendLineBelow" "<;>" = "CollapseSelection" "" = "FlipSelections" "<%>" = "SelectAll" "" = "SelectMode" # Entering insert mode (MJB-HLR-009) "" = "InsertMode" "" = "AppendMode" "" = "InsertAtLineStart" "" = "InsertAtLineEnd" "" = "OpenBelow" "" = "OpenAbove" # Modification (MJB-HLR-010) "" = "DeleteSelection" "" = "ChangeSelection" # Undo / redo (MJB-HLR-011) "" = "Undo" "" = "Redo" # Scrolling and paging (MJB-HLR-013) "" = "PageCursorHalfUp" "" = "PageCursorHalfDown" "" = "PageUp" "" = "PageDown" "" = "PageUp" "" = "PageDown" # Command mode (MJB-HLR-016) "<:>" = "CommandMode" [keybindings.select] # Select mode repeats normal-mode motions, but extends rather than replaces. "" = "ExtendCharLeft" "" = "ExtendLineDown" "" = "ExtendLineUp" "" = "ExtendCharRight" "" = "ExtendNextWordStart" "" = "ExtendPrevWordStart" "" = "ExtendNextWordEnd" "" = "NormalMode" "" = "NormalMode" "" = "DeleteSelection" "" = "ChangeSelection" "<;>" = "CollapseSelection" [keybindings.insert] # Any printable key not bound here self-inserts; that fallback is not # expressible as a table entry. (MJB-LLR-156) "" = "NormalMode" "" = "InsertNewline" "" = "DeleteCharBackward" "" = "DeleteCharForward" "" = "InsertTab" "" = "DeleteCharBackward" "" = "DeleteCharForward" "" = "DeleteWordBackward" "" = "KillToLineStart" "" = "MoveCharLeft" "" = "MoveLineDown" "" = "MoveLineUp" "" = "MoveCharRight" [keybindings.command] # Command mode routes keys to a line editor; only these are bound. (MJB-LLR-158) "" = "NormalMode" "" = "CommandSubmit" "" = "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"