Pressing enter will perform the highlighted command in the palette. Is there a way to use tab as well?
I use tab for code auto-completion and keep hitting in when in command palette, but to no avail.
Pressing enter will perform the highlighted command in the palette. Is there a way to use tab as well?
I use tab for code auto-completion and keep hitting in when in command palette, but to no avail.
I think the below key binding should do what you want. It will apply to every overlay and not just the command palette, which means that it will also trigger in the quick panel (for example when selecting a build system) and the Goto Anything panel as well. I’m not sure offhand if there’s a way to detect which overlay is currently active though, should that be undesirable.
{ "keys": ["tab"], "command": "select", "context":
[
{ "key": "overlay_visible", "operator": "equal", "operand": true }
]
},
How would I go about making it so when I hit tab it chooses scrolls down the choise list and Shift+Tab scrolls up the selection, and enter selects the choice? Much like the behavior for code completion, but with the command pallette?
These are the key bindings that you can use for such a task. So pressing tab will go down in the command palette and shift + tab will go up the list of options (when a overlay is open). Note that ST3 doesn’t have a way to distinguish between which overlay is open, but in ST4, it’s possible to make these command palette specific such that it doesn’t effect the goto overlay.
{
"keys": ["tab"],
"command": "move",
"args": { "by": "lines", "forward": true, },
"context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
],
},
{
"keys": ["shift+tab"],
"command": "move",
"args": { "by": "lines", "forward": false, },
"context": [
{ "key": "overlay_visible", "operator": "equal", "operand": true },
],
},
this worked perfect !! i can’t thank you enough!! was searching for so long lol. much appreciated! cheers!