microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.78k stars 29.11k forks source link

Add suggested completions for key chords #3969

Open pcgeek86 opened 8 years ago

pcgeek86 commented 8 years ago

With more complex key chords, it would be incredibly helpful to have "suggested" completions, based on the first element of the chord. For example, consider the following complicated workflow:

  1. You type CMD + K
  2. Visual Studio Code waits for the next key of the chord (but doesn't tell you what valid options could be typed)
  3. User forgets or doesn't know the shortcut he wants, so he hits ESCAPE
  4. User hits F1 to search for the desired command and keyboard shortcut
  5. User hits ESCAPE
  6. User executes keyboard shortcut

Instead, what should happen is that VS Code should show the users all of the key chords (or perhaps most commonly used commands by that specific user, based on telemetry data), that could possibly be pressed.

This would have the following benefits:

Cheers, Trevor Sullivan Microsoft MVP: PowerShell https://trevorsullivan.net https://twitter.com/pcgeek86

d-akara commented 7 years ago

Eclipse does this and it is very nice. You have a popup menu after waiting about 1 second. You can then use the cursor keys to pick an item or finish the key chord.

image
jtanner commented 7 years ago

http://spacemacs.org/ has this too and I love it. It makes discovering and learning key bindings easy.

Spacemacs discoverability

CptDarling commented 6 years ago

Eclipse does this and it is very nice. You have a popup menu after waiting about 1 second. You can then use the cursor keys to pick an item or finish the key chord.

image

Blender also pops up a menu when there are more chords available.

andersennl commented 5 years ago

Has there been any progress on this topic? I came here searching for how to use shortcut chords, thinking VSCode already had this feature.

I’ve found this extension which might be the answer: https://marketplace.visualstudio.com/items?itemName=michaelgriscom.leadermode

hasrthur commented 4 years ago

Is there any plans to support it? Or are there any extensions which might help with that? The one above is not exactly what the topic starter meant I guess

macintacos commented 4 years ago

Just to expand on this; I think that it's important to have this feature if you want to build up a set of mnemonic chords for shortcuts, similar to how Spacemacs is set up. This, plus the addition of 3-step chords (#6966), would make VSCode really flexible for the users that want to make sure their setup is exactly the way they want it.

ashketchupppp commented 4 years ago

+1 to this, I'm trying to move from spacemacs and the which key extension is amazing, I want to setup my keybinds so that all non-text editing keybinds are using chords and it is a pain in the arse. This would make my life so so much easier

macintacos commented 4 years ago

Shameless plug, but in this vein I created a keymap called Chord Heavy, inspired by Spacemacs chords. It’d greatly benefit from having this feature added!

thiagomajesk commented 3 years ago

I'm also interested in this, I think it would be a great addition. What's the requirement for getting this approved/ voted, etc?

DevBodin commented 2 years ago

Was hoping to find it already existed. How frustrating.

ashketchupppp commented 2 years ago

Just found this, which may help some folks out. Not at my PC so haven't tried it https://marketplace.visualstudio.com/items?itemName=VSpaceCode.whichkey&ssr=false#overview

ellacrity commented 1 year ago

I think this would greatly enhance the user experience for many, many people. Furthermore, the addition of this feature would, in my humble opinion, help with VSCode product adoption. I use both Neovim and VSCode, but have been transitioning to using the latter much more often lately.

I miss the feature provided by which-key, a popular Neovim plugin that has been mentioned within this ticket above. The plugin emulates the exact behavior that is being requested by this issue. I personally use a lot of key chord combinations, as it greatly increases the number of actions one can do at any given time and makes things (generally) more convenient. Furthermore, VSCode itself has tons of built-in chord combinations.

I truly think it would help others transition from Vim/Neovim to VSCode if this feature were to exist, or have better support for it. As a human, it is, unfortunately, very difficult to remember every sequence of keys, all of the time. It's great when we do, but can really interrupt our flow when we forget, and have to refer to our key-bindings again (and again, maybe! ;).

Is there anything that is blocking this issue? I don't see any contributor activity in this issue, so I figured I would ask. I do fully understand that this is mainly a quality-of-life enhancement, and likely has low priority, but it would definitely be a huge enhancement to user/developer experience.

macintacos commented 1 year ago

@ellacrity yes, see VSpaceCode and vscode-which-key

pawelfras commented 6 months ago

Is there any update on this matter? VSpaceCode and vscode-which-key are ok for Vim extension users, but it would be beneficial to have the idea presented by @pcgeek86 built in the VSC, to support native chords.