Configuration
Configuration
Section titled “Configuration”This page is for using rim, not for developing rim.
If you have used Yazi before, the mental model is similar: start from the default behavior, create only the file you need, and override only the part you want to change.
Config Directory
Section titled “Config Directory”rim reads user configuration from the platform config directory returned by rim_paths::user_config_root().
Typical locations are:
- Linux and other Unix-like systems:
~/.config/rim/ - macOS:
~/Library/Application Support/rim/ - Windows:
%AppData%\\rim\\
The active files are:
editor.tomlkeymaps.tomlcommands.toml
rim does not create these files automatically. If a file is missing, the built-in preset stays active for that file.
Load Behavior
Section titled “Load Behavior”On startup, rim loads the files in this order:
editor.tomlkeymaps.tomlcommands.toml
That order matters:
editor.tomlchanges editor-level UI and movement settings.keymaps.tomlchanges keys in normal, insert, visual, command, and overlay scopes.commands.tomladds or overrides command-line aliases such as:w,:q, or your own shortcuts.
If one file fails to parse, the other files still continue to load.
Important Behavior
Section titled “Important Behavior”Missing files
Section titled “Missing files”Missing files are normal. rim falls back to embedded defaults.
Live reload
Section titled “Live reload”If a config file already exists when rim starts, rim watches it and reloads it after you save changes.
If the file does not exist when rim starts, creating it later will not hot-load it in the current session. In that case, restart rim.
Unknown fields
Section titled “Unknown fields”Config parsing is strict. Unknown fields are rejected instead of ignored.
For example, this is invalid in editor.toml because commands does not belong there:
[editor]leader_key = ","
[command]commands = []Partial override
Section titled “Partial override”Each file only owns its own slice:
editor.tomldoes not affect keymaps or command aliases.keymaps.tomldoes not affect editor settings.commands.tomldoes not affect keymaps.
This is the safest way to customize rim: keep each concern in its own file.
editor.toml
Section titled “editor.toml”Use editor.toml for high-level editor behavior.
Current supported keys:
leader_keycursor_scroll_thresholdkey_hints_widthkey_hints_max_height
Example:
[editor]leader_key = ","cursor_scroll_threshold = 3key_hints_width = 64key_hints_max_height = 28What each setting does
Section titled “What each setting does”leader_key: the key used by<leader>bindings inkeymaps.toml. The default is space.cursor_scroll_threshold: how early the viewport starts following the cursor near the edge of the visible area.0means the cursor can reach the edge before scrolling.key_hints_width: width of help and plugin hint windows.key_hints_max_height: maximum height of help and plugin hint windows.
Minimal example
Section titled “Minimal example”If you only want to change the leader key, keep the file minimal:
[editor]leader_key = ","You do not need to copy every default into the file.
keymaps.toml
Section titled “keymaps.toml”Use keymaps.toml to add or replace key bindings.
The supported top-level sections are:
[mode.normal][mode.visual][mode.command][mode.insert][overlay.whichkey][overlay.command_palette][overlay.picker][overlay.notification_center]
Each section contains a keymap array.
Example:
[mode.normal]keymap = [ { on = "<leader>ff", run = "core.picker.files", desc = "Find files" }, { on = "<leader>bn", run = "core.buffer.new_empty", desc = "New buffer" },]Binding fields
Section titled “Binding fields”Each keymap entry supports:
on: one key sequence as a string, or multiple alternative sequences as a string arrayrun: the command to executeargs: optional positional arguments passed to the commanddesc: optional description shown in help-style UIs
Example with multiple trigger sequences:
[mode.normal]keymap = [ { on = ["{", "H"], run = "core.buffer.prev", desc = "Previous buffer" },]Common key notation
Section titled “Common key notation”Examples already used by the built-in preset include:
jgg<Esc><Enter><Backspace><Tab><C-h><C-v><leader>wv<leader><Tab>n
The safest approach is to copy an existing built-in pattern and change only the command name.
Prefix conflicts
Section titled “Prefix conflicts”rim validates normal-mode style sequences and rejects ambiguous prefixes.
For example, a short binding can conflict with a longer binding that starts with the same sequence. When this happens, the conflicting entry is skipped and a config error is reported.
Built-in examples
Section titled “Built-in examples”Useful built-in run targets from the current preset include:
core.picker.filescore.notificationscore.savecore.quitcore.buffer.nextcore.buffer.prevcore.window.split_verticalcore.window.split_horizontal
Example:
[mode.normal]keymap = [ { on = "<leader>e", run = "core.notifications", desc = "Notifications" },]Binding a plugin command
Section titled “Binding a plugin command”Plugin commands can also be bound here after the plugin is discovered.
Example for the Yazi plugin:
[mode.normal]keymap = [ { on = "<leader>y", run = "plugin.yazi.yazi", desc = "Open Yazi picker" },]If the plugin is not installed, rim keeps running, but that plugin command will not work.
commands.toml
Section titled “commands.toml”Use commands.toml for command-line aliases.
Example:
[command]commands = [ { name = "Q", run = "core.quit_all", desc = "Quit all" }, { name = "Files", run = "core.picker.files", desc = "Find files" },]Command fields
Section titled “Command fields”Each command entry supports:
name: the command name you typerun: the actual target commandargs: optional positional argumentsdesc: optional human-readable description
Practical examples
Section titled “Practical examples”Create a shorter alias:
[command]commands = [ { name = "n", run = "core.notifications", desc = "Notifications" },]Add a plugin alias:
[command]commands = [ { name = "Yazi", run = "plugin.yazi.yazi", desc = "Open Yazi picker" }, { name = "y", run = "plugin.yazi.yazi", desc = "Open Yazi picker" },]This is useful when you want both:
- a memorable full command such as
:Yazi - a short personal alias such as
:y
Default Presets
Section titled “Default Presets”If you want a known-good starting point, inspect the built-in preset files in this repository:
The recommended workflow is:
- Copy only the relevant fragment from a preset.
- Save it into your user config directory.
- Change one thing at a time.
- Restart
rimif the file did not exist when the session started.
Error Handling
Section titled “Error Handling”When a config error happens:
rimlogs the error internally- the status area shows a config error summary
- invalid entries are skipped instead of crashing the editor
Typical causes:
- wrong file for the section
- unknown field
- unknown
rundirective - invalid key sequence
- conflicting key prefixes
When debugging, keep the file minimal and re-add entries gradually.
User Workflow Recommendation
Section titled “User Workflow Recommendation”For most users, this order is the least risky:
- Set
leader_keyineditor.toml - Add a few personal bindings in
keymaps.toml - Add short command aliases in
commands.toml - Install plugin commands only after the base config is stable