Skip to content

Allow custom keybindings for "Copy relative path" and "Copy absolute path" #43

Description

@robert-flo

Feature request

Currently Copy relative path and Copy absolute path are only reachable via the menu — they don't have an Esc <key> shortcut like most other menu actions (Esc s, Esc f, Esc n, etc.).

Since these two actions are things I reach for constantly (mainly to paste paths into an AI coding agent or into SSH commands), having to open the menu every time breaks the "mouse-first, low friction" flow that's the whole point of SpiceEdit.

Proposed solution

Two options, either would work for me:

  1. Ship default hotkeys for these two actions, the same way every other menu item already has one (e.g. Esc y for relative path, Esc Y for absolute path — just an example, happy to defer to whatever fits the existing scheme).
  2. User-defined keybindings, following the same pattern already used for custom actions (~/.config/spiceedit/actions.json). A small ~/.config/spiceedit/keybindings.json (or a keybindings section reusing the same file) mapping built-in menu actions to an Esc <key> combo would let each user pick their own, without turning this into a general config file.

Given the project's stance against a general config file, option 2 (opt-in, small JSON, mirrors the existing actions.json mechanism) seems more in line with the project's philosophy than adding a new file just for this.

Screenshot for context

Attached: the menu, showing Copy relative path and Copy absolute path with no Esc shortcut next to them.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions