Skip to content

code-completion doesn't use next suggestion on pressing tab multiple times #28215

@DomiR

Description

@DomiR

TL;DR the tab key should insert first suggestion, but then cycle through suggestions, replacing the last completion.

Sublime autocompletion can be configured so that when pressing the tab multiple times it will cycle through the autocompletions by inserting the first suggestion (closing the suggestion box), then replacing the suggestion by succeeding ones when pressing tab repeatedly.

Problem description:
Visually:

// e.g. 1. typing`whatI` will render both options in suggestion box
whatI|
      -whatIGet   // => 2. first option will be autocompleted on `tab` closing the suggestion box
      -whatIWant // => 3. on second `tab` this should replace the first (wrong) suggestion

function whatIWant() {}

funciton whatIGet() {}

Textually:

  1. Type whatI
  2. Suggestions will pop up
  3. Wrong suggestion is highlighted
  4. tab to complete wrong suggestion
  5. Suggestions-popup disappears
  6. Still at the end of inserted suggestion press tab again
  7. Wrong suggestion should be replaced by next suggestion in list

Currently the corresponding controllers don't seem to support this, as accepting the current suggestion to my understanding will clear the suggestion list.

https://github.com/Microsoft/vscode/blob/3215f19074d49e32d5ab55203923865910d4d5ca/src/vs/editor/contrib/suggest/browser/suggestController.ts
https://github.com/Microsoft/vscode/blob/794b435b27bcf4a92cc0a6345b97821e3c827dcc/src/vs/editor/contrib/suggest/browser/suggestWidget.ts

How are people getting around having to press arrow-down and arrow-up 🤦‍♂️? I somehow never get the correct suggestion at the top and I quite frankly don't have the most flexible pinky 😢

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityrelease-notesRelease notes issuessuggestIntelliSense, Auto Completeverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions