Comments (7)
and must contain whichKeyVisible which limits this shortcut to be only applicable when the which-key menu is visible
I think I missed that caveat. That said is there a way to trigger a submenu without which-key already visible?
from vscode-which-key.
Found one solution:
{
"key": "shift+2",
"command": "extension.multiCommand.execute",
"args": {
"sequence": [
"vspacecode.space",
{ "command": "whichkey.triggerKey", "args": "@" },
],
},
"when": "!whichKeyVisible && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"
},
It works! But downside is requires the multiCommand extension. If there's a cleaner way, I'd love to see a better solution
from vscode-which-key.
Let me make sure I understand the problem. You are trying to have @
to open the which-key menu that's equal to SPC w
when the current editor is magit editor.
Your workaround is probably the best bet currently. I thought about adding keys sequence to the show
API which is used by vspacecode.space
so I user can bind a command to do exactly what you are trying to do.
from vscode-which-key.
Also, per buffer remapping in vim was mentioned on VSCodeVim/Vim#4765 (comment)
from vscode-which-key.
Let me make sure I understand the problem. You are trying to have
@
to open the which-key menu that's equal toSPC w
when the current editor is magit editor.
That’s correct.
Your workaround is probably the best bet currently. I thought about adding keys sequence to the
show
API which is used byvspacecode.space
so I user can bind a command to do exactly what you are trying to do.
I’m willing to give a PR for that a shot if you’re open to it.
Will try the per-buffer remapping approach as well
from vscode-which-key.
I’m willing to give a PR for that a shot if you’re open to it.
Sure :) Let me know if you have any questions.
Will try the per-buffer remapping approach as well
Unfortunately, that's just a thread mentioning that functionality doesn't exist today.
from vscode-which-key.
I’m willing to give a PR for that a shot if you’re open to it.
Sure :) Let me know if you have any questions.
Great will do!
Will try the per-buffer remapping approach as well
Unfortunately, that's just a thread mentioning that functionality doesn't exist today.
Oh my mistake, I misunderstood there but your reply probably just saved me a good chunk of time 😅
from vscode-which-key.
Related Issues (20)
- Unable to create when condition for pin/unpin editor HOT 4
- Option to selectively hide items from menu? HOT 3
- Support for VSCode Web HOT 3
- Navigate up / back in the menu structure HOT 2
- Show key bindings in menus HOT 3
- Support partial override HOT 1
- Weird behaviour with Github Pull Request extension HOT 1
- `whichkey.delay` causes a delay in `SPC SPC` shortcut, others seem to be unaffected HOT 6
- Add default binding for `git pull`
- Crash when mixing `key` / `keys` and using `whichkey.sortOrder` HOT 2
- [bug/ feature?]: whichkey.searchBindings should support fuzzy search HOT 2
- [Help Wanted] Show the menu when press g HOT 3
- Debug Transient State gets closed. HOT 4
- Support several menus HOT 4
- Space keybind with vscode-neovim and the Commands option HOT 5
- `bindings` vs `bindingOverrides` and `keys` vs `key` HOT 3
- Ability to specify font for menu "keys" HOT 6
- Typos in commands
- Reliable key sequence handling HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-which-key.