Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cycle to previous suggestions in VSCode

enter image description here

Hi, is there a way in Visual Studio Code to cycle to suggested keywords even when you already selected one of them (by clicking TAB multiple times)? This is possible in Sublime. In VSCode even with the keybindings of Sublime it does not work.

In the GIF above, in order to cycle through keywords, I pressed TAB several times, after typing 'hel' and 'he'

like image 393
Naramsim Avatar asked Oct 14 '25 12:10

Naramsim


1 Answers

I think it is not possible to achieve this exact behavior out of the box. Even the Sublime Text Keymap does not support this. Maybe you want to open a new issue?
A possible workaround to achieve something similar could be to add custom keybindings. To enable toggling the suggestions via Tab and Shift + Tab you can add the following to your keybindings.json:

{
    "key": "tab",
    "command": "selectNextSuggestion",
    "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
},
{
    "key": "shift+tab",
    "command": "selectPrevSuggestion",
    "when": "editorTextFocus && suggestWidgetMultipleSuggestions && suggestWidgetVisible"
}

Update

Maybe macros can solve this. This enables you to chain multiple vscode commands into a single command. Then you can bind this new command to Tab.

like image 172
HaaLeo Avatar answered Oct 17 '25 16:10

HaaLeo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!