visual-studio-code

vscode how to disable accepting suggestion on pressing tab


When type something, vscode show some suggestions, I press tab. the suggestion will autocomplete what I typing.

Now I want to disable that. I want when I press tab, it will not autocomplete.

I do not want to disable suggestion or autocomplete, I just want to disable the tab thing

This is what I've got in the setting

"editor.acceptSuggestionOnCommitCharacter": false,
"emmet.triggerExpansionOnTab": false,
"editor.tabCompletion": "off",
"editor.suggest.snippetsPreventQuickSuggestions": false

problem remains, the tab thing still working


Solution

  • As @HolyBlackCat suggested, disable the command acceptSelectedSuggestion which is triggered with a tab key. You will end up with this in your keybindings.json:

    {
        "key": "tab",
        "command": "-acceptSelectedSuggestion",
        "when": "suggestWidgetVisible && textInputFocus"
      },