zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
50.02k stars 3.06k forks source link

Double-tap Keybinds #6460

Closed Sensanaty closed 4 months ago

Sensanaty commented 9 months ago

Check for existing issues

Describe the feature

In the Jetbrains editors, one of the default keybinds is a double-tap of the Shift key to open their global searchbar. The main use of this is for fuzzy finding files, though it also acts similarly to the command palette common to VSC, Sublime & indeed in Zed. This is so far ingrained in my muscle memory that I find it nearly impossible to use other editors until I set this up for file searches, however I've found that I'm not able to do this in keymap.json (or maybe I'm just doing it wrong :D)

My keymap.json:

[
  {
    "context": "Workspace",
    "bindings": {
      "shift shift": "file_finder::Toggle"
    }
  }
]

I've also tried shift+shift, shift-shift, to no avail. Is this something that is supported in Zed yet?

In Sublime the option looks like this:

{ 
  "keys": ["shift", "shift"],
  "command": "show_overlay", 
  "args": { 
    "overlay": "goto",
    "text": "@"
  } 
}

And in VSCode it looks like this:

{
  "key": "shift shift",
  "command": "workbench.action.quickOpen"
}

If applicable, add mockups / screenshots to help present your vision of the feature

No response

JosephTLyons commented 9 months ago

Thanks for the report @Sensanaty - yep, at the moment, we don't have a way to register something like this, but we should def support it going forward, as I know it will be needed to really make JetBrains users comforable.

Yonben commented 9 months ago

Definitely a wanted feature, it's one of my favorite keybind in JetBrains fwiw :)

Acetyld commented 5 months ago

Nice to see this is being worked on!

joloppo commented 5 months ago

Double-tap ALT -> hold -> up/down for multicursor is something similar, also quite useful.

b-hayes commented 4 months ago

Reopen this issue.

I just installed Zed and I am using the JetBrains keymap offered by the IDE installation.

The double tap of shift is still mapped wrong and instantly makes me want to ditch Zed. If you don't get the single most used jetbrains shortcut right and have no way to correct it, then it looks really bad.

Hitting the usual settings shortcut presents me with a json json file with no keybinds in it.

Using the menu to open keybinds presents me with an empty json file.

Opening default keybinds is a nother json file that has stuff in it, but has no reference to the JetBrains keymap.

I search for how to fix this and see a closed issue from 6 months ago.

If you offer jetbrains mapping get it right or at least have some usable settings interface or you just turning people away.

As first impressions go, zed looks like it is going to be a waste of time.

notpeter commented 4 months ago

@b-hayes I hear you.

I've recently been spending much of my time improving our keymaps (including creating the initial version of our JetBrains for Linux keymap) but there's definitely more room to improve.

This particular issue was closed because we now can support modifier only shortcuts like "shift shift" (previously there was a bug that prevented this mapping from working) not because we considered shift shift feature complete.

Thanks for commenting @b-hayes, I very much appreciate the honest feedback.

notpeter commented 4 months ago

See also:

Please subscribe to those issues if you would like to track their progress and vote 👍 to increase visibility.