helix-editor/helix · error

No command named '{}'

Error message

No command named '{}'

What it means

The fallback arm of MappableCommand::from_str: strings with no ':' (typable) or '@' (macro) prefix are looked up in MappableCommand::STATIC_COMMAND_LIST (internal commands like 'move_next_word', 'command_palette'). No exact match returns 'No command named <s>'. Any unknown spelling of a non-colon, non-@ string lands here.

Source

Thrown at helix-term/src/commands.rs:680

                    };
                    MappableCommand::Typable {
                        name: cmd.name.to_owned(),
                        doc,
                        args: args.to_string(),
                    }
                })
                .ok_or_else(|| anyhow!("No TypableCommand named '{}'", s))
        } else if let Some(suffix) = s.strip_prefix('@') {
            helix_view::input::parse_macro(suffix).map(|keys| Self::Macro {
                name: s.to_string(),
                keys,
            })
        } else {
            MappableCommand::STATIC_COMMAND_LIST
                .iter()
                .find(|cmd| cmd.name() == s)
                .cloned()
                .ok_or_else(|| anyhow!("No command named '{}'", s))
        }
    }
}

impl<'de> Deserialize<'de> for MappableCommand {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: Deserializer<'de>,
    {
        let s = String::deserialize(deserializer)?;
        s.parse().map_err(de::Error::custom)
    }
}

impl PartialEq for MappableCommand {
    fn eq(&self, other: &Self) -> bool {
        match (self, other) {
            (

View on GitHub (pinned to 079a789e8c)

Solutions

  1. If an Ex-style command was intended, add the ':' prefix (":w", not "w").
  2. Otherwise fix the spelling so it matches a static command name exactly (snake_case identifiers from STATIC_COMMAND_LIST).
  3. Reload config and re-test; a single bad entry can abort the whole keymap load.

Example fix

# before (config.toml)
[keys.normal]
"C-x" = "w"
# after
[keys.normal]
"C-x" = ":w"
Defensive patterns

Strategy: validation

Validate before calling

// check both branches the parser uses: ':' -> typable, bare -> static
fn is_valid_binding(s: &str) -> bool {
    s.parse::<helix_term::commands::MappableCommand>().is_ok()
}

Type guard

fn is_mappable_command(s: &str) -> bool {
    s.parse::<helix_term::commands::MappableCommand>().is_ok()
}

Try / catch

if let Err(err) = entry.parse::<MappableCommand>() {
    report_config_warning(key, err); // keep loading the rest of the keymap
}

Prevention

When it happens

Trigger: A keymaps value like "move_next_chsr" (typo); a typed command written without its ':' prefix ("w" or "write" instead of ":w"); a static command that only exists in another helix version.

Common situations: Migrating keymaps between helix versions where static commands were renamed; forgetting the ':' prefix; names guessed instead of copied from the command list.

Related errors


AI-assisted analysis of helix-editor/helix@079a789e8c (2026-08-16). Data as JSON: /api/errors/30607d65a912283f. Report an issue: GitHub.