zed icon indicating copy to clipboard operation
zed copied to clipboard

On linux, the default format keybind conflicts with the edit_prediction::ToggleMenu keybind

Open zjeffer opened this issue 7 months ago • 1 comments

Summary

Description

Because the edit_prediction::ToggleMenu and editor::Format share the same keybind (ctrl-shift-i), the edit_prediction::ToggleMenu never happens. Formatting works, though.

It would also be nice if zed had some kind of automatic way of marking keybinds as conflicting with other keybinds, so that these kinds of issues are easier to find.

Steps to reproduce:

  1. Start zed
  2. Use ctrl+shift+i to toggle the editor prediction menu
  3. It will format instead.

Expected Behavior: there should be no conflicts between keybinds Actual Behavior: the menu never opens because of the conflict

Fixed with this keymap
[
  {
    "context": "Workspace",
    "bindings": {
      // "shift shift": "file_finder::Toggle"
    }
  },
  {
    "context": "Editor",
    "bindings": {
      // "j k": ["workspace::SendKeystrokes", "escape"]
      "ctrl-alt-l": "editor::Format",
      "ctrl-shift-i": "edit_prediction::ToggleMenu"
    }
  }
]

In my config I changed editor::Format to ctrl+alt+l, because that's the same keybind that vscode uses by default on linux.

Zed Version and System Specs

Zed: v0.184.8 (Zed) 
OS: Linux Wayland arch unknown
Memory: 30.5 GiB
Architecture: x86_64
GPU: NVIDIA GeForce RTX 3080 || NVIDIA || 570.144

zjeffer avatar May 01 '25 17:05 zjeffer

It's the same with ctrl-shift-e to toggle edit predictions for the current buffer; the default keymap contains a conflict so this doesn't work out of the box.

henare avatar May 26 '25 00:05 henare

I've moved these to alternate keys in:

  • https://github.com/zed-industries/zed/pull/36519

Not great defaults, but better than conflicting. Thanks for reporting.

notpeter avatar Aug 19 '25 19:08 notpeter